repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
yarikoptic/seaborn | seaborn/distributions.py | 1 | 32067 | """Plottng functions for visualizing distributions."""
from __future__ import division
import colorsys
import numpy as np
from scipy import stats
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import warnings
try:
import statsmodels.api as sm
_has_statsmodels = True
except ImportE... | bsd-3-clause |
google/qkeras | qkeras/utils.py | 1 | 41915 | # Copyright 2019 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | apache-2.0 |
cbertinato/pandas | pandas/tests/series/test_analytics.py | 1 | 58196 | from itertools import product
import operator
import numpy as np
from numpy import nan
import pytest
import pandas.util._test_decorators as td
import pandas as pd
from pandas import (
Categorical, CategoricalIndex, DataFrame, Series, date_range, isna, notna)
from pandas.api.types import is_scalar
from pandas.cor... | bsd-3-clause |
LUTAN/tensorflow | tensorflow/contrib/learn/python/learn/estimators/estimator.py | 1 | 54835 | # Copyright 2016 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 |
Fresnoy/kart | diffusion/management/commands/_import_awards/tools.py | 1 | 43818 | #! /usr/bin/env python
# -*- coding=utf8 -*-
import os
from difflib import SequenceMatcher
# import matplotlib.pyplot as plt
import pathlib
import logging
import pandas as pd
import pytz
from datetime import datetime
from django.db.utils import IntegrityError
from django_countries import countries
from django.db.model... | agpl-3.0 |
MJuddBooth/pandas | pandas/core/generic.py | 1 | 388405 | # pylint: disable=W0231,E1101
import collections
from datetime import timedelta
import functools
import gc
import json
import operator
from textwrap import dedent
import warnings
import weakref
import numpy as np
from pandas._libs import Timestamp, iNaT, properties
import pandas.compat as compat
from pandas.compat im... | bsd-3-clause |
fcollonval/matplotlib_qtquick_playground | backend/backend_qtquick5/backend_qquick5agg.py | 1 | 34813 | import ctypes
import os
import sys
import traceback
import matplotlib
from matplotlib.backends.backend_agg import FigureCanvasAgg
from matplotlib.backend_bases import cursors
from matplotlib.figure import Figure
from matplotlib.backends.backend_qt5 import TimerQT
from matplotlib.externals import six
from PyQt5 ... | mit |
mifumagalli/mypython | ifu/muse_redux_cubex.py | 1 | 37756 | def individual_resample(listob,refpath='./',nproc=24):
"""
Loop over each OB and re-run scipost using a final coadded cube as
a reference for WCS. This produces cubes that are all regridded to
a common 3D grid with a single interpolation.
listob -> OBs to process
refpath -> where reference ... | gpl-2.0 |
magnusdv/filtus | filtus/Filtus.py | 1 | 42718 | # -*- coding: utf-8 -*-
#================================================================
# FILTUS: A tool for downstream analysis of variant files
# See: http://folk.uio.no/magnusv/filtus.html
#----------------------------------------------------------------
PROGRAM_NAME = "FILTUS"
VERSION = "1.0.5"
import gc
impor... | gpl-2.0 |
bmcage/stickproject | stick/yarn1d/yarn1dmodel.py | 1 | 30964 | #
# Copyright (C) 2010 B. Malengier
# Copyright (C) 2010 P.Li
# Copyright (C) 2010 T. Goessens
#
# 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 2 of the License, or
# (at your ... | gpl-2.0 |
abinashpanda/pgmpy | pgmpy/inference/ExactInference.py | 1 | 31393 | #!/usr/bin/env python3
import copy
import itertools
import networkx as nx
import numpy as np
from pgmpy.extern.six.moves import filter, range
from pgmpy.extern.six import string_types
from pgmpy.factors.discrete import factor_product
from pgmpy.inference import Inference
from pgmpy.models import JunctionTree
from pgm... | mit |
MJuddBooth/pandas | pandas/tests/frame/test_missing.py | 1 | 32760 | # -*- coding: utf-8 -*-
from __future__ import print_function
import datetime
from distutils.version import LooseVersion
import dateutil
import numpy as np
import pytest
from pandas.compat import PY2, lrange
import pandas.util._test_decorators as td
import pandas as pd
from pandas import Categorical, DataFrame, Se... | bsd-3-clause |
cbertinato/pandas | pandas/tests/groupby/test_groupby.py | 1 | 55987 | from collections import OrderedDict
from datetime import datetime
from decimal import Decimal
from io import StringIO
import numpy as np
import pytest
from pandas.errors import PerformanceWarning
import pandas as pd
from pandas import (
DataFrame, Index, MultiIndex, Series, Timestamp, date_range, read_csv)
impor... | bsd-3-clause |
zfrenchee/pandas | pandas/tests/test_base.py | 1 | 43476 | # -*- coding: utf-8 -*-
from __future__ import print_function
import re
import sys
from datetime import datetime, timedelta
import pytest
import numpy as np
import pandas as pd
import pandas.compat as compat
from pandas.core.dtypes.common import (
is_object_dtype, is_datetimetz,
needs_i8_conversion)
import pa... | bsd-3-clause |
pysal/spaghetti | spaghetti/tests/network_unittest_classes.py | 1 | 35944 | from libpysal import cg, examples, io
from libpysal.common import RTOL, ATOL
import numpy
import unittest
import copy
try:
import geopandas
GEOPANDAS_EXTINCT = False
except ImportError:
GEOPANDAS_EXTINCT = True
# empirical data ---------------------------------------------------------------
# network sha... | bsd-3-clause |
jseabold/statsmodels | statsmodels/tsa/exponential_smoothing/ets.py | 1 | 88194 | r"""
ETS models for time series analysis.
The ETS models are a family of time series models. They can be seen as a
generalization of simple exponential smoothing to time series that contain
trends and seasonalities. Additionally, they have an underlying state space
model.
An ETS model is specified by an error type (E... | bsd-3-clause |
subodhchhabra/glances | glances/outputs/glances_curses.py | 1 | 41579 | # -*- coding: utf-8 -*-
#
# This file is part of Glances.
#
# Copyright (C) 2016 Nicolargo <nicolas@nicolargo.com>
#
# Glances 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 Lic... | lgpl-3.0 |
TomAugspurger/pandas | pandas/core/indexes/interval.py | 1 | 44715 | """ define the IntervalIndex """
from operator import le, lt
import textwrap
from typing import Any, Optional, Tuple, Union
import numpy as np
from pandas._config import get_option
from pandas._libs import lib
from pandas._libs.interval import Interval, IntervalMixin, IntervalTree
from pandas._libs.tslibs import Tim... | bsd-3-clause |
sidorov-si/TADStates | calc_cws.py | 1 | 47654 | #!/usr/bin/env python
"""
Calculate cross-window score (CWS) for each border between Hi-C windows
(the width of a Hi-C window is equal to a contact matrix resolution,
and a genome is split into back-to-back windows).
CWS of a border is a number of contacts that cross the border. If vicinity_size
is set then during ... | gpl-2.0 |
RJT1990/pyflux | pyflux/ssm/nllt.py | 1 | 30987 | import sys
if sys.version_info < (3,):
range = xrange
import numpy as np
import pandas as pd
import scipy.stats as ss
from scipy import optimize
from .. import inference as ifr
from .. import families as fam
from .. import output as op
from .. import tsm as tsm
from .. import data_check as dc
from .. import covar... | bsd-3-clause |
mmottahedi/neuralnilm_prototype | scripts/e94.py | 2 | 37079 | from __future__ import print_function, division
import matplotlib
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
from neuralnilm import Net, RealApplianceSource, BLSTMLayer, SubsampleLayer, DimshuffleLayer
from lasagne.nonlinearities import sigmoid, rectify
from lasagne.objectives import c... | mit |
great-expectations/great_expectations | great_expectations/util.py | 1 | 36849 | import copy
import cProfile
import importlib
import io
import json
import logging
import os
import pstats
import re
import time
from collections import OrderedDict
from datetime import datetime
from functools import wraps
from gc import get_referrers
from inspect import (
ArgInfo,
BoundArguments,
Parameter,... | apache-2.0 |
yousrabk/mne-python | mne/preprocessing/ica.py | 1 | 103443 | # Authors: Denis A. Engemann <denis.engemann@gmail.com>
# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Juergen Dammers <j.dammers@fz-juelich.de>
#
# License: BSD (3-clause)
from inspect import isfunction
from collections import namedtuple
from copy import deepcopy
import os
import ... | bsd-3-clause |
TuKo/brainiak | brainiak/utils/fmrisim.py | 1 | 74062 | # Copyright 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | apache-2.0 |
kdmurray91/scikit-bio | skbio/alignment/_tabular_msa.py | 1 | 79726 | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | bsd-3-clause |
dragly/doconce | lib/doconce/misc.py | 1 | 383597 | import os, sys, shutil, re, glob, time, subprocess, codecs
from doconce import errwarn
_part_filename = '._%s%03d'
_part_filename_wildcard = '._*[0-9][0-9][0-9]'
_registered_command_line_options = [
('--help',
'Print all options to the doconce program.'),
('--debug',
"""Write a debugging file _docon... | bsd-3-clause |
Transkribus/TranskribusDU | TranskribusDU/tasks/TablePrototypes/DU_ABPTableRG41.py | 1 | 38778 | # -*- coding: utf-8 -*-
"""
DU task for ABP Table: doing jointly row BIESO and horizontal grid lines
block2line edges do not cross another block.
Here we make consistent label when any N grid lines have no block in-between
each other.
In that case, those N grid lines must have consistent... | bsd-3-clause |
rs2/pandas | pandas/tests/arithmetic/test_period.py | 1 | 56440 | # Arithmetic tests for DataFrame/Series/Index/Array classes that should
# behave identically.
# Specifically for Period dtype
import operator
import numpy as np
import pytest
from pandas._libs.tslibs import IncompatibleFrequency, Period, Timestamp, to_offset
from pandas.errors import PerformanceWarning
import pandas... | bsd-3-clause |
dolittle007/tf_star | bin/gene2TF.py | 1 | 45456 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# __author__ = 'T-Y Wang'
# ------------------------------------
# Python Module
# ------------------------------------
import os
import sys
import argparse
import subprocess
import multiprocessing
import random
import tqdm
import datetime
import logging
import errno
impo... | mit |
timothyb0912/pylogit | tests/test_mixed_logit.py | 1 | 52071 | # -*- coding: utf-8 -*-
"""
Created on Sun Jul 17 15:59:25 2016
@author: timothyb0912
"""
import unittest
import warnings
from collections import OrderedDict
from copy import deepcopy
import mock
import numpy as np
import pandas as pd
from scipy.sparse import csr_matrix
import numpy.testing as npt
import pylogit.mix... | bsd-3-clause |
plotly/plotly.py | packages/python/plotly/plotly/graph_objs/scatterternary/marker/_colorbar.py | 1 | 73724 | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class ColorBar(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatterternary.marker"
_path_str = "scatterternary.marker.colorbar"
_valid_props = {
... | mit |
MthwRobinson/APPLPy | applpy/rv.py | 1 | 184016 | """
Main Random Variable Module
1. The Random Variable class
2. Procedures for changing functional form
3. Operations on one random variable
4. Operations on two random variables
5. Plots
Class Procedures:
1. display()
1. verifyPDF()
2. variate(n)
Functional Form Conversion:
1. CDF(RVar,value)
2.... | gpl-3.0 |
annayqho/TheCannon | TheCannon/helpers/simpletable.py | 1 | 88984 | """ This file implements a Table class
that is designed to be the basis of any format
Requirements
------------
* FIT format:
* astropy:
provides a replacement to pyfits
pyfits can still be used instead but astropy is now the default
* HDF5 format:
* pytables
RuntimeError will be raised ... | mit |
treycausey/scikit-learn | sklearn/ensemble/forest.py | 1 | 51778 | """Forest of trees-based ensemble methods
Those methods include random forests and extremely randomized trees.
The module structure is the following:
- The ``BaseForest`` base class implements a common ``fit`` method for all
the estimators in the module. The ``fit`` method of the base ``Forest``
class calls the ... | bsd-3-clause |
romain-fontugne/ripeAtlasDetector | analysis/plot.py | 1 | 71089 | import statsmodels.api as sm
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pylab as plt
import tools
import rttAnalysis
import pandas as pd
from bson import objectid
import re
from pytz import timezone
import sys
import itertools
import datetime
from datetime import timedelta
from pytz import timezone
impor... | gpl-2.0 |
equialgo/scikit-learn | sklearn/model_selection/_validation.py | 1 | 37616 | """
The :mod:`sklearn.model_selection._validation` module includes classes and
functions to validate the model.
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>,
# Gael Varoquaux <gael.varoquaux@normalesup.org>,
# Olivier Grisel <olivier.grisel@ensta.org>
# License: BSD 3 clause
from __... | bsd-3-clause |
MLWave/kepler-mapper | kmapper/kmapper.py | 1 | 33225 | from __future__ import division
from collections import defaultdict
from datetime import datetime
import inspect
import itertools
import os
import sys
import warnings
from jinja2 import Environment, FileSystemLoader, Template
import numpy as np
from sklearn import cluster, preprocessing, manifold, decomposition
from ... | mit |
garbersc/keras-galaxies | initiate_deconvnet_nomerge.py | 1 | 30729 | import theano.sandbox.cuda.basic_ops as sbcuda
import numpy as np
import matplotlib.pyplot as plt
import realtime_augmentation as ra
import load_data
import functools
import time
import os
from PIL import Image
from datetime import timedelta, date
from custom_keras_model_x_cat import kaggle_x_cat
from simple_deconv i... | bsd-3-clause |
vidartf/hyperspy | hyperspy/axes.py | 1 | 39039 | # -*- 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 |
anntzer/scikit-learn | sklearn/datasets/tests/test_openml.py | 1 | 52574 | """Test the openml loader.
"""
import gzip
import warnings
import json
import os
import re
from io import BytesIO
import numpy as np
import scipy.sparse
import sklearn
import pytest
from sklearn import config_context
from sklearn.datasets import fetch_openml
from sklearn.datasets._openml import (_open_openml_url,
... | bsd-3-clause |
dmitryduev/pypride | src/pypride/classes.py | 1 | 108453 | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 7 17:05:04 2013
Definitions of classes used in pypride
@author: Dmitry A. Duev
"""
import ConfigParser
import datetime
from astropy.time import Time
#import sys
import numpy as np
import scipy as sp
#from matplotlib.cbook import flatten
from math import *
#from math i... | gpl-2.0 |
a-hel/screening_mgmt | screening_mgmt/screening_mgmt.py | 1 | 86206 | #!/usr/bin/python
"""
.. module:: screening_mgmt
:platform: OSX, Windows
:synopsis: SCREENING_MGMT: A module to automate data handling from screening
experiments. It is a GUI-based interface between raw experimental data and a
data base, where data is stored according to pre-defined routines. It a... | gpl-3.0 |
jni/skeletons | tifffile.py | 1 | 121871 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# tifffile.py
# Copyright (c) 2008-2013, Christoph Gohlke
# Copyright (c) 2008-2013, 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... | bsd-3-clause |
aricooperman/Jzipline | zipline/testing/fixtures.py | 1 | 44372 | from abc import ABCMeta, abstractproperty
import sqlite3
from unittest import TestCase
from contextlib2 import ExitStack
from logbook import NullHandler, Logger
from nose_parameterized import parameterized
from pandas.util.testing import assert_series_equal
from six import with_metaclass
from toolz import flip
import ... | apache-2.0 |
ZGainsforth/MultiLaue | MainWindow.py | 1 | 42252 | # Created 2016, Zack Gainsforth
import os
import sys
os.environ['QT_API'] = 'pyqt'
import numpy as np
from MultiLaueGUI import Ui_MultiLaueMainWindow
from AboutBox import Ui_AboutDialog
from PyQt5 import QtGui, QtCore, QtWidgets
from skimage.external.tifffile import imsave
import json
import matplotlib
from DetectorG... | epl-1.0 |
bkendzior/scipy | scipy/stats/_distn_infrastructure.py | 1 | 119118 | #
# Author: Travis Oliphant 2002-2011 with contributions from
# SciPy Developers 2004-2011
#
from __future__ import division, print_function, absolute_import
from scipy._lib.six import string_types, exec_, PY3
from scipy._lib._util import getargspec_no_self as _getargspec
import sys
import keyword
import r... | bsd-3-clause |
tensorflow/estimator | tensorflow_estimator/python/estimator/canned/v1/baseline_test_v1.py | 1 | 55981 | # 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 |
architecture-building-systems/CEAforArcGIS | cea/technologies/substation.py | 1 | 44153 | """
Substation Model
"""
import numpy as np
import pandas as pd
import scipy
from numba import jit
import cea.config
from cea.constants import HEAT_CAPACITY_OF_WATER_JPERKGK
from cea.constants import HOURS_IN_YEAR
from cea.technologies.constants import DT_HEAT, DT_COOL, U_COOL, U_HEAT
__author__ = "Jimeno A. Fons... | mit |
kasperschmidt/TDOSE | tdose_model_FoV.py | 1 | 47232 | # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
import numpy as np
import sys
import astropy.io.fits as afits
import scipy.optimize as opt
import tdose_utilities as tu
import matplotlib as mpl
mpl.use('Agg') # prevent pyplot from opening window; enables clos... | mit |
fabianp/scikit-learn | sklearn/utils/estimator_checks.py | 1 | 47929 | from __future__ import print_function
import types
import warnings
import sys
import traceback
import inspect
import pickle
from copy import deepcopy
import numpy as np
from scipy import sparse
import struct
from sklearn.externals.six.moves import zip
from sklearn.externals.joblib import hash, Memory
from sklearn.ut... | bsd-3-clause |
xhochy/arrow | dev/archery/archery/integration/datagen.py | 1 | 46829 | # 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 |
openego/dingo | tests/core/network/test_grids.py | 1 | 77576 | import pytest
from ding0.tools.tools import (get_cart_dest_point, create_poly_from_source)
#from ding0.flexopt.check_tech_constraints import get_critical_line_loading
from ding0.core.network.loads import LVLoadDing0
from ding0.core.network.cable_distributors import LVCableDistributorDing0
from shapely.geometry impor... | agpl-3.0 |
maxalbert/blaze | blaze/compute/tests/test_sql_compute.py | 1 | 56155 | from __future__ import absolute_import, division, print_function
import pytest
sa = pytest.importorskip('sqlalchemy')
import itertools
import re
from distutils.version import LooseVersion
import datashape
from odo import into, resource, discover
from pandas import DataFrame
from toolz import unique
from blaze.com... | bsd-3-clause |
pratapvardhan/pandas | pandas/tests/generic/test_generic.py | 2 | 35082 | # -*- coding: utf-8 -*-
# pylint: disable-msg=E1101,W0612
from copy import copy, deepcopy
from warnings import catch_warnings
import pytest
import numpy as np
import pandas as pd
from pandas.core.dtypes.common import is_scalar
from pandas import (Series, DataFrame, Panel,
date_range, MultiIndex)
... | bsd-3-clause |
google-research/google-research | private_sampling/experiments.py | 1 | 45793 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# 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 applicab... | apache-2.0 |
mikehankey/fireball_camera | master-stacks.py | 1 | 40652 | #!/usr/bin/python3
# script to make master stacks per night and hour from the 1 minute stacks
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
import time
from sklearn.cluster import KMeans
from sklearn import datasets
from PIL import Image, ImageChops... | gpl-3.0 |
fedhere/pyMCZ | pyMCZ/mcz.py | 1 | 32495 | #!/usr/bin/env python
from __future__ import print_function
import os
import sys
import argparse
import warnings
import numpy as np
import scipy.stats as stats
from scipy.special import gammaln
from scipy import optimize
import matplotlib.pyplot as plt
from matplotlib.ticker import FormatStrFormatter
import csv as csv... | mit |
winklerand/pandas | pandas/core/categorical.py | 1 | 81287 | # pylint: disable=E1101,W0232
import numpy as np
from warnings import warn
import types
from pandas import compat
from pandas.compat import u, lzip
from pandas._libs import lib, algos as libalgos
from pandas.core.dtypes.generic import (
ABCSeries, ABCIndexClass, ABCCategoricalIndex)
from pandas.core.dtypes.missi... | bsd-3-clause |
dannyjacobs/PRISim | main/delay_spectrum_snapshot_movie_maker.py | 1 | 77243 | import numpy as NP
from astropy.io import fits
from astropy.io import ascii
from astropy import coordinates as coord
from astropy.coordinates import Galactic, FK5
from astropy import units
import astropy.cosmology as CP
import scipy.constants as FCNST
from scipy import interpolate
import matplotlib.pyplot as PLT
import... | mit |
jhonatanoliveira/pgmpy | pgmpy/models/BayesianModel.py | 1 | 36892 | #!/usr/bin/env python3
import itertools
from collections import defaultdict
import logging
from operator import mul
import networkx as nx
import numpy as np
import pandas as pd
from pgmpy.base import DirectedGraph
from pgmpy.factors.discrete import TabularCPD, JointProbabilityDistribution, DiscreteFactor
from pgmpy.... | mit |
MartialD/hyperspy | hyperspy/signal_tools.py | 1 | 55222 | # -*- 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 |
CGATOxford/proj029 | Proj029Pipelines/PipelineMetaomics.py | 1 | 44215 | ####################################################
####################################################
# functions and classes used in conjunction with
# pipeline_metaomics.py
####################################################
####################################################
# import libraries
import sys
impo... | bsd-3-clause |
GemHunt/sail | rotational/image_set.py | 1 | 33452 | import cPickle as pickle
import glob
import math
import os
import shutil
import imageio
from collections import namedtuple
import cv2
import networkx as nx
import pandas as pd
import caffe_image as ci
results_dict = {}
Image = namedtuple('Image', 'seed_image_id image_id angle max_value')
Group = namedtuple('Group', ... | mit |
tessonec/PySPG | spg/plot/notebook.py | 1 | 32145 | #!/usr/bin/python
'''
Created on 12 Apr 2014
@author: tessonec
'''
import spg.plot as spgp
import spg.base as spgb
import spg.utils as spgu
import pandas as pd
import numpy as np
import math as m
import os.path
import re
import ipywidgets as ipyw
import itertools
import matplotlib as mpl
import matplotlib.pyp... | gpl-3.0 |
informatics-isi-edu/microscopy | pyramid/tifffile/tifffile/tifffile.py | 1 | 231175 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# tifffile.py
# Copyright (c) 2008-2017, Christoph Gohlke
# Copyright (c) 2008-2017, 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... | apache-2.0 |
FRidh/python-acoustics | acoustics/signal.py | 1 | 41843 | """
Signal
======
The signal module constains all kinds of signal processing related functions.
.. inheritance-diagram:: acoustics.signal
Filtering
*********
.. autoclass:: Filterbank
.. autofunction:: bandpass_filter
.. autofunction:: octave_filter
.. autofunction:: bandpass
.. autofunction:: lowpass
.. autofunct... | bsd-3-clause |
aymeric-spiga/mcd-python | mcdcomp.py | 1 | 30078 | ## set colorbar-type and value limits
def setbounds(field,vmin=None,vmax=None):
import numpy as np
limtype = "neither"
w = np.where(np.isnan(field) == False)
fieldclean = field[w]
if vmin is None and vmax is None:
vmin = np.min(fieldclean) - 1.e-35 # epsilon to avoid blank spaces
vmax = ... | gpl-2.0 |
bda2017-shallowermind/MusTGAN | magenta/magenta/models/rl_tuner/rl_tuner.py | 2 | 80889 | # Copyright 2016 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 ag... | apache-2.0 |
gfyoung/scipy | scipy/special/add_newdocs.py | 1 | 176240 | # Docstrings for generated ufuncs
#
# The syntax is designed to look like the function add_newdoc is being
# called from numpy.lib, but in this file add_newdoc puts the
# docstrings in a dictionary. This dictionary is used in
# _generate_pyx.py to generate the docstrings for the ufuncs in
# scipy.special at the C level... | bsd-3-clause |
plotly/python-api | packages/python/plotly/plotly/graph_objs/layout/scene/_yaxis.py | 1 | 95764 | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class YAxis(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.scene"
_path_str = "layout.scene.yaxis"
_valid_props = {
"autorange",
... | mit |
isaacyeaton/global-dyn-non-equil-gliding | Code/script_kinematic_squirrel.py | 1 | 43039 | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 13 21:22:12 2014
%reset -f
%pylab
%clear
%load_ext autoreload
%autoreload 2
@author: isaac
"""
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from scipy.interpolate import UnivariateSpline
import time
# to load a... | mit |
NixaSoftware/CVis | venv/lib/python2.7/site-packages/pandas/core/indexes/base.py | 1 | 144970 | import datetime
import warnings
import operator
import numpy as np
from pandas._libs import (lib, index as libindex, tslib as libts,
algos as libalgos, join as libjoin,
Timestamp, Timedelta, )
from pandas._libs.lib import is_datetime_array
from pandas._libs.tslibs im... | apache-2.0 |
cwebster2/pyMeteo | pymeteo/skewt.py | 1 | 45186 | #!/usr/bin/env python
"""
.. module:: pymeteo.skewt
:platform: Unix, Windows
:synopsis: Skew-T/Log-P plotting
.. moduleauthor:: Casey Webster <casey.webster@gmail.com>
This module allows plotting Skew-T/Log-P diagrams
and hodographs from arrays of
data with helper functions to plot directly from CM1 output fi... | bsd-3-clause |
LeeKamentsky/CellProfiler | cellprofiler/modules/reassignobjectnumbers.py | 1 | 31783 | '''<b>Reassign Object Numbers</b> renumbers previously identified objects.
<hr>
Objects and their measurements are associated
with each other based on their object numbers (also known as <i>labels</i>). Typically,
each object is assigned a single unique number, such that the exported measurements are ordered
by this n... | gpl-2.0 |
RJT1990/pyflux | pyflux/arma/nnarx.py | 1 | 30963 | import sys
if sys.version_info < (3,):
range = xrange
import numpy as np
import pandas as pd
import scipy.stats as ss
from patsy import dmatrices, dmatrix, demo_data
from .. import families as fam
from .. import output as op
from .. import tests as tst
from .. import tsm as tsm
from .. import data_check as dc
fr... | bsd-3-clause |
anderspitman/scikit-bio | skbio/metadata/_testing.py | 1 | 37014 | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | bsd-3-clause |
moorepants/BicycleDataProcessor | bicycledataprocessor/main.py | 1 | 52944 | #!/usr/bin/env python
# built in imports
import os
import datetime
from math import pi
# dependencies
import numpy as np
from scipy import io
from scipy.integrate import cumtrapz
from scipy.optimize import curve_fit
import matplotlib.pyplot as plt
from tables import NoSuchNodeError
import dtk.process as process
from ... | bsd-2-clause |
decvalts/landlab | landlab/grid/base.py | 1 | 112051 | #! /usr/env/python
"""
Python implementation of ModelGrid, a base class used to create and manage
grids for 2D numerical models.
Data Fields in ModelGrid
------------------------
:class:`~.ModelGrid` inherits from the :class:`~.ModelDataFields` class. This
provides `~.ModelGrid`, and its subclasses, with the ability t... | mit |
AllenDowney/ModSimPy | modsim/modsim.py | 1 | 51686 | """
Code from Modeling and Simulation in Python.
Copyright 2017 Allen Downey
License: https://creativecommons.org/licenses/by/4.0)
"""
import logging
logger = logging.getLogger(name="modsim.py")
# TODO: Make this Python 3.7 when conda is ready
# make sure we have Python 3.6 or better
import sys
if sys.version_in... | mit |
ioam/featuremapper | featuremapper/__init__.py | 1 | 39214 | """
FeatureResponses and associated functions and classes.
These classes implement map and tuning curve measurement based
on measuring responses while varying features of an input pattern.
"""
from __future__ import absolute_import
import param
from param.version import Version
__version__ = Version(release=(0,2,1), ... | bsd-3-clause |
tdda/tdda | tdda/constraints/pd/testpdconstraints.py | 1 | 69202 | # -*- coding: utf-8 -*-
"""
Test Suite
"""
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import datetime
import json
import math
import os
import time
import shutil
import subprocess
import sys
import tempfile
import unittest
from collections import Ord... | mit |
lewisodriscoll/sasview | src/sas/sascalc/calculator/resolution_calculator.py | 1 | 39326 | """
This object is a small tool to allow user to quickly
determine the variance in q from the
instrumental parameters.
"""
from instrument import Sample
from instrument import Detector
from instrument import TOF as Neutron
from instrument import Aperture
# import math stuffs
from math import pi
from math import sqrt
i... | bsd-3-clause |
Gorbagzog/StageIAP | MCMC_SHMR_main_clean_iterations.py | 1 | 49098 | #!/usr/bin/env python3
# -*-coding:Utf-8 -*
"""Use MCMC to find the stellar mass halo mass relation.
Based on the Behroozi et al 2010 paper.
Use a parametrization of the SHMR, plus a given HMF to find the expected SMF and compare it
to the observed SMF with its uncertainties using a likelihod maximisation.
Started o... | gpl-3.0 |
rs2/pandas | pandas/plotting/_core.py | 1 | 61120 | import importlib
from typing import TYPE_CHECKING, Optional, Sequence, Tuple, Union
from pandas._config import get_option
from pandas._typing import Label
from pandas.util._decorators import Appender, Substitution
from pandas.core.dtypes.common import is_integer, is_list_like
from pandas.core.dtypes.generic import A... | bsd-3-clause |
lixun910/pysal | pysal/explore/esda/smoothing.py | 1 | 72059 | from __future__ import division
"""
Apply smoothing to rate computation
[Longer Description]
Author(s):
Myunghwa Hwang mhwang4@gmail.com
David Folch dfolch@asu.edu
Luc Anselin luc.anselin@asu.edu
Serge Rey srey@asu.edu
"""
__author__ = "Myunghwa Hwang <mhwang4@gmail.com>, David Folch <dfolch@asu.edu... | bsd-3-clause |
Chedi/airflow | airflow/www/views.py | 1 | 77315 | import sys
import os
import socket
from functools import wraps
from datetime import datetime, timedelta
import dateutil.parser
import copy
from itertools import chain, product
from past.utils import old_div
from past.builtins import basestring
import inspect
import traceback
import sqlalchemy as sqla
from sqlalche... | apache-2.0 |
moeyensj/atmo2mags | atmo2mags/atmobuilder.py | 1 | 135489 | ### Necessary imports
import numpy as np
import os
import copy
import matplotlib.pyplot as plt
import matplotlib.patches as mp
import lsst.sims.photUtils.Sed as Sed
import lsst.sims.photUtils.Bandpass as Bandpass
from atmo2mags.atmo import Atmo
from astroML.plotting.mcmc import convert_to_stdev
from astroML.decorator... | bsd-3-clause |
kushalbhola/MyStuff | Practice/PythonApplication/env/Lib/site-packages/pandas/core/dtypes/dtypes.py | 1 | 35265 | """ define extension dtypes """
import re
from typing import Any, Dict, List, Optional, Tuple, Type, Union
import warnings
import numpy as np
import pytz
from pandas._libs.interval import Interval
from pandas._libs.tslibs import NaT, Period, Timestamp, timezones
from pandas.core.dtypes.generic import ABCCategoricalI... | apache-2.0 |
ominux/scikit-learn | sklearn/datasets/samples_generator.py | 1 | 30412 | """
Generate samples of synthetic data sets.
"""
# Authors: B. Thirion, G. Varoquaux, A. Gramfort, V. Michel, O. Grisel,
# G. Louppe
# License: BSD 3 clause
import numpy as np
from scipy import linalg
from ..utils import check_random_state
def make_classification(n_samples=100, n_features=20, n_informativ... | bsd-3-clause |
harisbal/pandas | pandas/core/internals/blocks.py | 1 | 110101 | # -*- coding: utf-8 -*-
import warnings
import inspect
import re
from datetime import datetime, timedelta, date
import numpy as np
from pandas._libs import lib, tslib, tslibs, internals as libinternals
from pandas._libs.tslibs import conversion, Timedelta
from pandas import compat
from pandas.compat import range, zi... | bsd-3-clause |
mhoffman/kmos | kmos/run/__init__.py | 1 | 88987 | #!/usr/bin/env python
"""
A front-end module to run a compiled kMC model. The actual model is
imported in kmc_model.so and all parameters are stored in kmc_settings.py.
The model can be used directly like so::
from kmos.model import KMC_Model
model = KMC_Model()
model.parameters.T = 500
model.do_step... | gpl-3.0 |
pierreberthet/bg_dopa_nest | main.py | 1 | 38441 | import sys
import os
import nest
import BasalGanglia
import Reward
import json
import simulation_parameters
import utils
import numpy as np
import time
import tempfile
import mynest
import mynest_light
import pprint as pp
os.environ['MPLCONFIGDIR'] = tempfile.mkdtemp()
import matplotlib
matplotlib.use('Agg')
import p... | gpl-2.0 |
jreback/pandas | pandas/tests/series/test_constructors.py | 1 | 61090 | from collections import OrderedDict
from datetime import datetime, timedelta
from dateutil.tz import tzoffset
import numpy as np
import numpy.ma as ma
import pytest
from pandas._libs import iNaT, lib
from pandas.core.dtypes.common import is_categorical_dtype, is_datetime64tz_dtype
from pandas.core.dtypes.dtypes impo... | bsd-3-clause |
kmspriyatham/symath | scipy/scipy/cluster/hierarchy.py | 2 | 93015 | """
========================================================
Hierarchical clustering (:mod:`scipy.cluster.hierarchy`)
========================================================
.. currentmodule:: scipy.cluster.hierarchy
These functions cut hierarchical clusterings into flat clusterings
or find the roots of the forest f... | apache-2.0 |
pylayers/pylayers | pylayers/antprop/rays.py | 1 | 132523 | # -*- coding: latin1 -*-
from __future__ import print_function
"""
.. currentmodule:: pylayers.antprop.rays
.. autosummary::
:members:
"""
import doctest
import os
import sys
import glob
try:
# from tvtk.api import tvtk
# from mayavi.sources.vtk_data_source import VTKDataSource
from mayavi import mlab
e... | mit |
JT5D/scikit-learn | sklearn/ensemble/tests/test_gradient_boosting.py | 1 | 33277 | """
Testing for the gradient boosting module (sklearn.ensemble.gradient_boosting).
"""
import numpy as np
import warnings
from sklearn import datasets
from sklearn.base import clone
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.ensemble.gra... | bsd-3-clause |
pravsripad/mne-python | mne/time_frequency/tfr.py | 3 | 97690 | """A module which implements the time-frequency estimation.
Morlet code inspired by Matlab code from Sheraz Khan & Brainstorm & SPM
"""
# Authors : Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Hari Bharadwaj <hari@nmr.mgh.harvard.edu>
# Clement Moutard <clement.moutard@polytechnique.org>
# ... | bsd-3-clause |
mzechmeister/serval | src/srv.py | 1 | 38925 | #! /usr/bin/python
from __future__ import division, print_function
import sys
import argparse
import numpy as np
from gplot import *
from pause import *
from wstat import nanwsem, wmean, mlrms, wstd
try:
import gls
except:
print('Cannot import gls')
try:
import astropy.io.fits as pyfits
except:
print('... | mit |
umn-earth-surface/gFlex | gflex/base.py | 1 | 44275 | import sys, ConfigParser, os
import numpy as np
import time # For efficiency counting
import types # For flow control
from matplotlib import pyplot as plt
from _version import __version__
class Utility(object):
"""
Generic utility functions
"""
def configGet(self, vartype, category, name, optional=False, spec... | gpl-3.0 |
pratapvardhan/pandas | pandas/core/sparse/frame.py | 1 | 36633 | """
Data structures for sparse float data. Life is made simpler by dealing only
with float64 data
"""
from __future__ import division
# pylint: disable=E1101,E1103,W0231,E0202
import warnings
from pandas.compat import lmap
from pandas import compat
import numpy as np
from pandas.core.dtypes.missing import isna, notna... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.