repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
interrogator/corpkit | corpkit/corpus.py | 1 | 56841 | """
corpkit: Corpus and Corpus-like objects
"""
from __future__ import print_function
from lazyprop import lazyprop
from corpkit.process import classname
from corpkit.constants import STRINGTYPE, PYTHON_VERSION
class Corpus(object):
"""
A class representing a linguistic text corpus, which contains files,
... | mit |
vortex-ape/scikit-learn | sklearn/feature_extraction/tests/test_text.py | 4 | 42468 | from __future__ import unicode_literals
import warnings
import pytest
from scipy import sparse
from sklearn.externals.six import PY2
from sklearn.feature_extraction.text import strip_tags
from sklearn.feature_extraction.text import strip_accents_unicode
from sklearn.feature_extraction.text import strip_accents_ascii
... | bsd-3-clause |
opengeostat/pygslib | pygslib/plothtml/__init__.py | 1 | 32211 | # -*- coding: utf-8 -*-
#!/usr/bin/env python
"""
PyGSLIB.plothtml, Module to plot data in HTML/Jupyter Notebooks.
This is a simplified interface to create javascript plots with
Bokeh and plotly.
The plots implemented are
- Histograms with GSLIB (suppor declustering weight)
- CDF with GSLIB (suppor declustering w... | mit |
kevin-intel/scikit-learn | sklearn/ensemble/_gb.py | 2 | 74917 | """Gradient Boosted Regression Trees.
This module contains methods for fitting gradient boosted regression trees for
both classification and regression.
The module structure is the following:
- The ``BaseGradientBoosting`` base class implements a common ``fit`` method
for all the estimators in the module. Regressi... | bsd-3-clause |
tpdance/arcapi | arcapi.py | 1 | 99807 | """
#-------------------------------------------------------------------------------
# Name: arcapi.arcapi
# Purpose: Core module for convenient API for arcpy
#
# Authors: Filip Kral, Caleb Mackey
#
# Created: 01/02/2014
# Licence: LGPL v3
#-----------------------------------------------... | lgpl-3.0 |
jasontlam/snorkel | snorkel/contrib/gen_learning/featurizedmodel/gen_learning.py | 2 | 33902 | from .disc_learning import NoiseAwareModel
from .utils import MentionScorer
import numbskull
from numbskull import NumbSkull
from numbskull.inference import FACTORS
from numbskull.numbskulltypes import Weight, Variable, Factor, FactorToVar
import numpy as np
import random
import scipy.sparse as sparse
from copy import ... | apache-2.0 |
energyPATHWAYS/energyPATHWAYS | energyPATHWAYS/util.py | 1 | 59741 | # -*- coding: utf-8 -*-
"""
Created on Wed Apr 08 10:12:52 2015
@author: Ben Haley & Ryan Jones
Contains unclassified global functions
"""
import config as cfg
import pint
import pandas as pd
import os
import numpy as np
from time_series import TimeSeries
from collections import defaultdict, OrderedDict, MutableSet... | mit |
OzFlux/PyFluxPro | scripts/pfp_rpLL.py | 1 | 30132 | """ Routines for the Lasslop et al partitioning scheme."""
# standard modules
import datetime
import logging
import os
import warnings
# 3rd party modules
import matplotlib.pyplot as plt
import numpy
from scipy.optimize import curve_fit, OptimizeWarning
# PFP modules
from scripts import constants as c
from scripts impo... | bsd-3-clause |
eglxiang/Med | DeepMed_crossVal.py | 1 | 41510 | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 15 11:06:19 2016
@author: apezeshk
"""
from __future__ import print_function
import sys
import os
import time
import numpy as np
import theano
from theano.compile.debugmode import DebugMode
import SupportFuncs_c
import theano.tensor as T
from lasagne.layers import dnn
i... | bsd-2-clause |
nismod/energy_demand | energy_demand/validation/lad_validation.py | 1 | 33133 | """Compare gas/elec demand on Local Authority Districts with modelled demand
"""
import os
import operator
import logging
import copy
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
from energy_demand.basic import lookup_tables
from energy_demand import enduse_func
from energy_demand.profile... | mit |
dssg/wikienergy | disaggregator/build/pandas/pandas/tseries/frequencies.py | 1 | 31065 | from datetime import datetime
from pandas.compat import range, long, zip
from pandas import compat
import re
import numpy as np
from pandas.core.algorithms import unique
from pandas.tseries.offsets import DateOffset
from pandas.util.decorators import cache_readonly
import pandas.tseries.offsets as offsets
import pand... | mit |
plotly/plotly.py | packages/python/plotly/plotly/graph_objs/_volume.py | 1 | 104254 | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Volume(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "volume"
_valid_props = {
"autocolorscale",
"caps",
"cauto",
"cmax",
... | mit |
mrshu/scikit-learn | sklearn/decomposition/dict_learning.py | 1 | 42108 | """ Dictionary learning
"""
# Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort
# License: BSD
import time
import sys
import itertools
import warnings
from math import sqrt, floor, ceil
import numpy as np
from scipy import linalg
from numpy.lib.stride_tricks import as_strided
from ..base import BaseEstimator... | bsd-3-clause |
pratapvardhan/pandas | pandas/tests/test_resample.py | 1 | 135214 | # pylint: disable=E1101
from warnings import catch_warnings
from datetime import datetime, timedelta
from functools import partial
from textwrap import dedent
from operator import methodcaller
import pytz
import pytest
import dateutil
import numpy as np
import pandas as pd
import pandas.tseries.offsets as offsets
im... | bsd-3-clause |
xray/xray | xarray/tests/test_dataset.py | 1 | 233780 | 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.indexes.datetimes import DatetimeIndex
import xarray as xr
from xarray import (
DataArray,
Dataset,
IndexVariab... | apache-2.0 |
boada/astlib_dev | astLib/astSED.py | 2 | 55763 | """module for performing calculations on Spectral Energy Distributions (SEDs)
(c) 2007-2013 Matt Hilton
U{http://astlib.sourceforge.net}
This module provides classes for manipulating SEDs, in particular the Bruzual &
Charlot 2003, Maraston 2005, and Percival et al 2009 stellar population
synthesis models are current... | lgpl-2.1 |
rabrahm/ceres | coralie/coraliepipe.py | 1 | 59702 | import sys
import matplotlib
matplotlib.use("Agg")
base = '../'
sys.path.append(base+"utils/Continuum")
sys.path.append(base+"utils/Correlation")
sys.path.append(base+"utils/GLOBALutils")
sys.path.append(base+"utils/OptExtract")
baryc_dir= base+'utils/SSEphem/'
sys.path.append(baryc_dir)
ephemeris='DEc403'
import ... | mit |
bbcdli/xuexi | fenlei_tf/script_Jan26/src/tensor_train_view.py | 1 | 64693 | # 25Apr.2016
# hy:24Jan.2017 v0.48
# Added feed augmented data online, no disk space consumption for these data
# Added test_model_online, replacing previous way of viewing test accuracy online.
# sudo apt-get install python-h5py
# Added eva.sh to run evaluation of multiple models
# Added function for evaluating multip... | apache-2.0 |
TomAugspurger/pandas | pandas/plotting/_core.py | 1 | 59691 | import importlib
from pandas._config import get_option
from pandas.util._decorators import Appender, Substitution
from pandas.core.dtypes.common import is_integer, is_list_like
from pandas.core.dtypes.generic import ABCDataFrame, ABCSeries
from pandas.core.base import PandasObject
def hist_series(
self,
b... | bsd-3-clause |
lorenzo-desantis/mne-python | mne/preprocessing/ica.py | 2 | 89894 | # 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 getargspec, isfunction
from collections import namedtuple
import os
import json
import n... | bsd-3-clause |
alephu5/Soundbyte | environment/lib/python3.3/site-packages/pandas/util/testing.py | 1 | 45475 | from __future__ import division
# pylint: disable-msg=W0402
import random
import re
import string
import sys
import tempfile
import warnings
import inspect
import os
import subprocess
import locale
import unittest
import traceback
from datetime import datetime
from functools import wraps, partial
from contextlib impo... | gpl-3.0 |
BiaDarkia/scikit-learn | sklearn/feature_extraction/text.py | 1 | 56449 | # -*- coding: utf-8 -*-
# Authors: Olivier Grisel <olivier.grisel@ensta.org>
# Mathieu Blondel <mathieu@mblondel.org>
# Lars Buitinck
# Robert Layton <robertlayton@gmail.com>
# Jochen Wersdörfer <jochen@wersdoerfer.de>
# Roman Sinayev <roman.sinayev@gmail.com>
#
# License: B... | bsd-3-clause |
airbnb/superset | tests/viz_tests.py | 1 | 52994 | # 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 |
ProfessorX/Config | .PyCharm30/system/python_stubs/-1247972723/numpy/core/umath.py | 1 | 105191 | # encoding: utf-8
# module numpy.core.umath
# from /usr/lib/python2.7/dist-packages/numpy/core/umath.so
# by generator 1.135
# no doc
# no imports
# Variables with simple values
e = 2.718281828459045
ERR_CALL = 3
ERR_DEFAULT = 0
ERR_DEFAULT2 = 521
ERR_IGNORE = 0
ERR_LOG = 5
ERR_PRINT = 4
ERR_RAISE = 2
ERR_WARN = 1
e... | gpl-2.0 |
tsherwen/AC_tools | AC_tools/GEOSChem_nc.py | 1 | 30406 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Functions for use with the GEOS-Chem chemical transport model (CTM).
Use help(<name of function>) to get details on a particular function.
"""
# - Required modules:
# I/O / Low level
import os
import sys
#import csv
import glob
import pandas as pd
import xarray as xr
impo... | mit |
aswolf/xmeos | xmeos/test/oldtest_models.py | 1 | 51179 | import numpy as np
import models
import pytest
import matplotlib.pyplot as plt
import matplotlib as mpl
from abc import ABCMeta, abstractmethod
import copy
#====================================================================
# Define "slow" tests
# - indicated by @slow decorator
# - slow tests are run only if using ... | mit |
boomsbloom/dtm-fmri | DTM/for_gensim/lib/python2.7/site-packages/matplotlib/backends/backend_pgf.py | 1 | 36674 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from matplotlib.externals import six
import math
import os
import sys
import errno
import re
import shutil
import tempfile
import codecs
import atexit
import weakref
import warnings
import numpy as np
import... | mit |
Twistbioscience/incubator-airflow | airflow/contrib/hooks/bigquery_hook.py | 1 | 42875 | # -*- coding: utf-8 -*-
#
# 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, software
... | apache-2.0 |
NixaSoftware/CVis | venv/lib/python2.7/site-packages/pandas/tests/test_categorical.py | 1 | 192653 | # -*- coding: utf-8 -*-
# pylint: disable=E1101,E1103,W0232
from warnings import catch_warnings
import pytest
import sys
from datetime import datetime
from distutils.version import LooseVersion
import numpy as np
from pandas.core.dtypes.dtypes import CategoricalDtype
from pandas.core.dtypes.common import (
is_ca... | apache-2.0 |
Ziqi-Li/bknqgis | pandas/pandas/core/indexes/datetimes.py | 2 | 79097 | # pylint: disable=E1101
from __future__ import division
import operator
import warnings
from datetime import time, datetime
from datetime import timedelta
import numpy as np
from pandas.core.base import _shared_docs
from pandas.core.dtypes.common import (
_NS_DTYPE, _INT64_DTYPE,
is_object_dtype, is_datetime64... | gpl-2.0 |
FCP-INDI/C-PAC | CPAC/utils/create_fsl_model.py | 1 | 56531 |
def load_pheno_file(pheno_file):
import os
import pandas as pd
if not os.path.isfile(pheno_file):
err = "\n\n[!] CPAC says: The group-level analysis phenotype file "\
"provided does not exist!\nPath provided: %s\n\n" \
% pheno_file
raise Exception(err)
wi... | bsd-3-clause |
jnsebgosselin/WHAT | gwhat/hydrograph4.py | 1 | 45725 | # -*- coding: utf-8 -*-
# Copyright © 2014-2018 GWHAT Project Contributors
# https://github.com/jnsebgosselin/gwhat
#
# This file is part of GWHAT (Ground-Water Hydrograph Analysis Toolbox).
# Licensed under the terms of the GNU General Public License.
#
# The function filt_data is based on the codes provided by
# Sta... | gpl-3.0 |
ioam/holoviews | holoviews/streams.py | 1 | 37987 | """
The streams module defines the streams API that allows visualizations to
generate and respond to events, originating either in Python on the
server-side or in Javascript in the Jupyter notebook (client-side).
"""
import uuid
import weakref
from numbers import Number
from collections import defaultdict
from context... | bsd-3-clause |
yepengxj/nmt | nmt/nmt.py | 1 | 68062 | '''
Build a attention-based neural machine translation model
'''
import theano
import theano.tensor as tensor
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
import cPickle as pkl
import numpy
import copy
import os
import warnings
import sys
import time
from scipy import optimize, stats
from co... | bsd-3-clause |
gfyoung/pandas | pandas/core/internals/blocks.py | 1 | 82138 | from __future__ import annotations
import inspect
import re
from typing import TYPE_CHECKING, Any, Callable, List, Optional, Type, Union, cast
import numpy as np
from pandas._libs import (
Interval,
Period,
Timestamp,
algos as libalgos,
internals as libinternals,
lib,
writers,
)
from pand... | bsd-3-clause |
dsm054/pandas | pandas/tests/test_window.py | 1 | 155547 | from collections import OrderedDict
from itertools import product
import pytest
import warnings
from warnings import catch_warnings
from datetime import datetime, timedelta
from numpy.random import randn
import numpy as np
import pandas as pd
from pandas import (Series, DataFrame, bdate_range,
isn... | bsd-3-clause |
llondon6/kerr_public | kerr/core.py | 1 | 113382 |
# Import underlying basic modules
from kerr.basics import *
# import dill
'''
Method to load tabulated QNM data, interpolate and then output for input final spin
'''
def leaver( jf, # Dimensionless BH Spin
l, # Polar Index
m, # Azim... | mit |
kelle/astropy | astropy/units/tests/test_quantity.py | 1 | 45681 | # coding: utf-8
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Test the Quantity class and related.
"""
from __future__ import (absolute_import, unicode_literals, division,
print_function)
import sys
import copy
import decimal
from fractions import Fraction
import num... | bsd-3-clause |
geophysics/mtpy | mtpy/modeling/modem_new.py | 1 | 377608 | #!/usr/bin/env python
"""
==================
ModEM
==================
# Generate data file for ModEM
# by Paul Soeffky 2013
# revised by LK 2014
# revised by JP 2014
# edited by AK 2016
"""
import os
import mtpy.core.z as mtz
import mtpy.core.mt as mt
import numpy as np
import mtpy.utils.latlongutmconversion as utm... | gpl-3.0 |
quimaguirre/diana | scripts/old_scripts/evaluation_with_clinicaltrials.py | 1 | 39150 | import argparse
import copy
import cPickle
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pylab
#from pylab import plot, show, savefig, xlim, figure, hold, ylim, legend, boxplot, setp, axes, xlabel, ylabel
import scipy
import time
import sys, os, re
from sklearn.decomposition import PCA
... | mit |
jfsehuanes/thunderfish | thunderfish/dataloader.py | 1 | 36490 | """
Functions for loading time-series data from files.
data, samplingrate, unit = load_data('data/file.wav')
Loads the whole time-series from the file as a numpy array of floats.
data = DataLoader('data/file.wav', 0, 60.0)
or
with open_data('data/file.wav', 0, 60.0) as data:
Create an DataLoader object that loads chu... | gpl-3.0 |
JT5D/scikit-learn | sklearn/grid_search.py | 1 | 32456 | """
The :mod:`sklearn.grid_search` includes utilities to fine-tune the parameters
of an estimator.
"""
from __future__ import print_function
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>,
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# Andreas Mueller <amueller@ais.uni-bonn.de>
# ... | bsd-3-clause |
justrypython/EAST | icdar.py | 1 | 32732 | # coding:utf-8
import glob
import csv
import cv2
import time
import os
import numpy as np
import scipy.optimize
import matplotlib.pyplot as plt
import matplotlib.patches as Patches
from shapely.geometry import Polygon
import tensorflow as tf
from data_util import GeneratorEnqueuer
tf.app.flags.DEFINE... | gpl-3.0 |
dssg/wikienergy | disaggregator/build/pandas/pandas/tests/test_format.py | 1 | 104714 | # -*- coding: utf-8 -*-
from __future__ import print_function
import re
from pandas.compat import range, zip, lrange, StringIO, PY3, lzip, u
import pandas.compat as compat
import itertools
import os
import sys
from textwrap import dedent
import warnings
from numpy import nan
from numpy.random import randn
import nump... | mit |
sniemi/SamPy | stis/STISCCDSpectroscopyFlat.py | 1 | 55408 | """
Creates STIS Spectroscopic pixel-to-pixel flat fields from RAW data.
Uses spline fits after dust motes, bad pixels, etc. have been masked
to fit and to remove the low frequency structure. The data are divided
by each fit to normalize the data before it is combined and co-added with
appropriate weighting of flux err... | bsd-2-clause |
adykstra/mne-python | mne/tests/test_annotations.py | 1 | 38925 | # Authors: Jaakko Leppakangas <jaeilepp@student.jyu.fi>
#
# License: BSD 3 clause
from datetime import datetime
from itertools import repeat
from collections import OrderedDict
import os.path as op
import pytest
from pytest import approx
from numpy.testing import (assert_equal, assert_array_equal,
... | bsd-3-clause |
setten/pymatgen | pymatgen/io/abinit/flows.py | 1 | 106096 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
A Flow is a container for Works, and works consist of tasks.
Flows are the final objects that can be dumped directly to a pickle file on disk
Flows are executed using abirun (abipy).
"""
from __future__ impo... | mit |
kernsuite-debian/lofar | CEP/Calibration/BBSTools/scripts/BBStiming.py | 1 | 38490 | #!/usr/bin/env python3
# Script that parses BBS kernel log for timing information
#
# For the moment this script only works on individual MS files and does collect
# the information through gds and ssh
#
#
# File: BBStiming.py
# Author: Sven Duscha (duscha@astron.nl)
# Date: 2011-03-08
# La... | gpl-3.0 |
ychaim/bbg | bbg/bbg.py | 1 | 33953 | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 04 17:44:27 2014
@author: Brian Jacobowski <bjacobowski.dev@gmail.com>
"""
import time
import collections
import blpapi as bb
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import datetime as dt
from optparse import OptionParser
fro... | bsd-3-clause |
jswanljung/iris | lib/iris/plot.py | 1 | 41376 | # (C) British Crown Copyright 2010 - 2016, Met Office
#
# This file is part of Iris.
#
# Iris 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) any l... | lgpl-3.0 |
jlonij/dac | dac/dac.py | 1 | 68173 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# DAC Entity Linker
#
# Copyright (C) 2017-2018 Juliette Lonij - Koninklijke Bibliotheek,
# National Library of the Netherlands
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
... | gpl-3.0 |
cbertinato/pandas | pandas/tests/io/parser/test_parse_dates.py | 1 | 37629 | """
Tests date parsing functionality for all of the
parsers defined in parsers.py
"""
from datetime import date, datetime
from io import StringIO
from dateutil.parser import parse as du_parse
from hypothesis import given, settings, strategies as st
import numpy as np
import pytest
import pytz
from pandas._libs.tslib... | bsd-3-clause |
anntzer/scikit-learn | sklearn/linear_model/tests/test_sgd.py | 1 | 59289 | import pickle
import pytest
import numpy as np
import scipy.sparse as sp
import joblib
from sklearn.utils._testing import assert_array_equal
from sklearn.utils._testing import assert_almost_equal
from sklearn.utils._testing import assert_array_almost_equal
from sklearn.utils._testing import assert_raises_regexp
from ... | bsd-3-clause |
mklauser/tardis-OLD | tardis/io/config_reader.py | 1 | 42649 | # Module to read the rather complex config data
# Currently the configuration file is documented in
# tardis/data/example_configuration.ini
import logging
import os
import pprint
import copy
from astropy import constants, units as u
import astropy.utils
import numpy as np
import pandas as pd
import yaml
from model_re... | bsd-3-clause |
clawpack/clawpack-4.x | python/pyclaw/plotters/plotpages.py | 1 | 77016 |
"""
Module plotpages
Utilities for taking a set of plot files and creating a set of html and/or
latex/pdf pages displaying the plots.
"""
import os, time, string, glob
# Clawpack logo... not used on plot pages currently.
clawdir = os.getenv('CLAW')
if clawdir is not None:
logo = os.path.join(clawdir,'doc/image... | bsd-3-clause |
BigDataforYou/movie_recommendation_workshop_1 | big_data_4_you_demo_1/venv/lib/python2.7/site-packages/pandas/tseries/tests/test_timeseries.py | 1 | 204844 | # pylint: disable-msg=E1101,W0612
import calendar
import operator
import sys
import warnings
from datetime import datetime, time, timedelta
from numpy.random import rand
from numpy.testing.decorators import slow
import nose
import numpy as np
import pandas.index as _index
import pandas.lib as lib
import pandas.tslib a... | mit |
jtwhite79/pyemu | autotest/utils_tests.py | 1 | 71637 | import os
if not os.path.exists("temp"):
os.mkdir("temp")
def add_pi_obj_func_test():
import os
import pyemu
pst = os.path.join("utils","dewater_pest.pst")
pst = pyemu.optimization.add_pi_obj_func(pst,out_pst_name=os.path.join("temp","dewater_pest.piobj.pst"))
print(pst.prior_information.loc["... | bsd-3-clause |
dpaiton/OpenPV | pv-core/analysis/python/plot_multiple_averaged_activity_firing_rates.py | 1 | 40045 | """
Plot the highest activity of four different bar positionings
"""
import sys
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import matplotlib.cm as cm
import PVReadSparse as rs
import PVReadWeights as rw
import PVConversions as conv
import scipy.cluster.vq as sp
import math
def fo... | epl-1.0 |
jaredwo/obsio | obsio/providers/madis.py | 1 | 64893 | from .. import LOCAL_DATA_PATH
from ..util.humidity import convert_rh_to_tdew, calc_pressure, \
convert_tdew_to_vpd, convert_rh_to_vpd, convert_tdew_to_rh
from ..util.misc import TimeZones, uniquify
from .generic import ObsIO
from datetime import datetime, timedelta
from io import StringIO
from lxml.html import par... | gpl-3.0 |
zfrenchee/pandas | pandas/tests/indexes/datetimes/test_tools.py | 1 | 71422 | """ test to_datetime """
import sys
import pytz
import pytest
import locale
import calendar
import dateutil
import numpy as np
from dateutil.parser import parse
from datetime import datetime, date, time
from distutils.version import LooseVersion
import pandas as pd
from pandas.conftest import is_dateutil_le_261, is_d... | bsd-3-clause |
altair-viz/altair | altair/vegalite/v4/schema/channels.py | 1 | 300285 | # The contents of this file are automatically written by
# tools/generate_schema_wrapper.py. Do not modify directly.
from . import core
import pandas as pd
from altair.utils.schemapi import Undefined
from altair.utils import parse_shorthand
class FieldChannelMixin(object):
def to_dict(self, validate=True, ignore... | bsd-3-clause |
bachiraoun/fullrmc | Constraints/AtomicCoordinationConstraints.py | 1 | 43951 | """
AtomicCoordinationConstraints contains classes for all constraints related
to coordination number in spherical shells around atoms.
.. inheritance-diagram:: fullrmc.Constraints.AtomicCoordinationConstraints
:parts: 1
"""
# standard libraries imports
from __future__ import print_function
import copy, re
# ext... | agpl-3.0 |
aw3s/PT3S | Mx.py | 1 | 240937 | """
SIR 3S MX-Interface (short: MX)
MX is a file based, channel-oriented interface for SIR 3S' calculation results.
This module contains stuff to utilize SIR 3S' MX calculation results in pure Python.
SIR 3S MX calculation results overview:
* Binary .MXS-Files contain the SIR 3S c... | mit |
winklerand/pandas | pandas/tests/sparse/test_frame.py | 1 | 57194 | # pylint: disable-msg=E1101,W0612
import operator
import pytest
from warnings import catch_warnings
from numpy import nan
import numpy as np
import pandas as pd
from pandas import Series, DataFrame, bdate_range, Panel
from pandas.core.dtypes.common import (
is_bool_dtype,
is_float_dtype,
is_object_dtype,... | bsd-3-clause |
YzPaul3/h2o-3 | h2o-py/tests/testdir_dynamic_tests/testdir_algos/glm/pyunit_glm_multinomial_large.py | 1 | 102685 | from __future__ import print_function
import sys
import os
import random
import math
import numpy as np
import time
sys.path.insert(1, "../../../../")
import h2o
from builtins import range
from tests import pyunit_utils
from h2o.estimators.glm import H2OGeneralizedLinearEstimator
from h2o.grid.grid_search import H2... | apache-2.0 |
google-research/robustness_metrics | robustness_metrics/metrics/uncertainty.py | 1 | 67277 | # coding=utf-8
# Copyright 2021 The Robustness Metrics 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 appli... | apache-2.0 |
EuropeanSocialInnovationDatabase/ESID-main | Helpers/BratDataProcessing/AnnDoTask2.py | 1 | 46116 | import nltk
from os import listdir
from os.path import isfile, join,isdir
import csv
import re
import sklearn.metrics
import numpy
#from database_access import *
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.naive_bayes import Multi... | gpl-3.0 |
LeeKamentsky/CellProfiler | cellprofiler/modules/calculateimageoverlap.py | 1 | 50378 | import cellprofiler.icons
from cellprofiler.gui.help import PROTIP_RECOMEND_ICON
__doc__ = '''
<b>Calculate Image Overlap </b> calculates how much overlap occurs between the white portions of two black and white images
<hr>
This module calculates overlap by determining a set of statistics that measure the closeness of... | gpl-2.0 |
wradlib/wradlib | wradlib/vis.py | 1 | 47401 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2011-2020, wradlib developers.
# Distributed under the MIT License. See LICENSE.txt for more info.
"""
Visualisation
^^^^^^^^^^^^^
Standard plotting and mapping procedures.
.. autosummary::
:nosignatures:
:toctree: generated/
{}
"""
__all__ = ... | mit |
jgbarah/Grimoire-demo | grimoireng_data.py | 1 | 42896 | #! /usr/bin/python
# -*- coding: utf-8 -*-
## Copyright (C) 2015 Bitergia
##
## 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... | gpl-3.0 |
vdrhtc/Measurement-automation | lib3/pulses/iq_pulse_sequence.py | 1 | 100597 | """ IN DEVELOPMENT. NOT USED ANYWHERE."""
from copy import deepcopy
from matplotlib import pyplot as plt
import numpy as np
from scipy import signal
from lib3.mixers.data_structures import HetIQCalibration
from lib3.pulses.pulse_sequence import PulseSequence
from itertools import cycle, islice
from typing import D... | gpl-3.0 |
dubeyabhi07/clipper | clipper_admin/clipper_manager.py | 1 | 55023 | """Clipper Management Utilities"""
from __future__ import print_function, with_statement, absolute_import
from fabric.api import *
from fabric.contrib.files import append
import os
import requests
import json
import yaml
import pprint
import subprocess32 as subprocess
import shutil
from sklearn import base
from sklear... | apache-2.0 |
fabioz/Pydev | plugins/org.python.pydev.core/pysrc/pydevd.py | 1 | 139203 | '''
Entry point module (keep at root):
This module starts the debugger.
'''
import sys # @NoMove
if sys.version_info[:2] < (2, 6):
raise RuntimeError('The PyDev.Debugger requires Python 2.6 onwards to be run. If you need to use an older Python version, use an older version of the debugger.')
import atexit
from c... | epl-1.0 |
dricciardelli/vae2vec | capt_gen_n2w_cs.py | 1 | 30730 | # -*- coding: utf-8 -*-
import math
import os
import tensorflow as tf
import numpy as np
import pandas as pd
import pickle
import pickle as pkl
import cv2
import skimage
import tensorflow.python.platform
from tensorflow.python.ops import rnn
from keras.preprocessing import sequence
from collections import Counter
from... | mit |
OSSHealth/ghdata | augur/metrics/issue.py | 1 | 45905 | #SPDX-License-Identifier: MIT
"""
Metrics that provides data about issues & their associated activity
"""
import datetime
import sqlalchemy as s
import pandas as pd
from augur.util import register_metric
@register_metric()
def issues_first_time_opened(self, repo_group_id, repo_id=None, period='day', begin_date=None, ... | mit |
otmaneJai/Zipline | zipline/algorithm.py | 1 | 53181 | #
# Copyright 2014 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 |
canismarko/xanespy | xanespy/xanes_math.py | 1 | 45043 | # -*- coding: utf-8 -*-
#
# Copyright © 2016 Mark Wolf
#
# This file is part of Xanespy.
#
# Xanespy 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 l... | gpl-3.0 |
agierut/PyLasso | PyLasso_MacOS/__init__.py | 1 | 189683 | # -*- coding: utf-8 -*-
# PyLasso: A PyMOL plugin to identify lassos, version for Mac platform
# Script/plugin by Aleksandra Gierut (a.gierut@cent.uw.edu.pl)
# Questions should be addressed to: Joanna Sulkowska (jsulkowska@cent.uw.edu.pl)
# Any technical difficulties and remarks please report to: Aleksandra Gierut (a.g... | mit |
ocelot-collab/ocelot | ocelot/cpbd/csr.py | 1 | 38997 | """
@ authors Martin Dohlus DESY, 2015, Sergey Tomin XFEL, 2016
"""
import time
import copy
import importlib
import logging
import numpy as np
from scipy import interpolate
from scipy.integrate import cumtrapz
from scipy.ndimage.filters import gaussian_filter
from scipy.optimize import curve_fit
from ocelot.common.g... | gpl-3.0 |
rlowrance/re-avm | chart06.py | 1 | 34495 | '''create charts showing results of valgbr.py
INVOCATION
python chart06.py FEATURESGROUP-HPS-LOCALITY --data
python chart06.py FEATURESGROUP-HPS-global [--test] [--subset] [--norwalk] [--all]
python chart06.py FEATURESGROUP-HPS-city [--test] [--subset] [--norwalk] [--all] [--trace]
where
FEATURESGROUP is one o... | bsd-3-clause |
zfrenchee/pandas | pandas/core/window.py | 1 | 65879 | """
provide a generic structure to support window functions,
similar to how we have a Groupby object
"""
from __future__ import division
import warnings
import numpy as np
from collections import defaultdict
from datetime import timedelta
from pandas.core.dtypes.generic import (
ABCSeries,
ABCDataFrame,
... | bsd-3-clause |
zhengwsh/InplusTrader_Linux | InplusTrader/ctaAlgo/ctaBacktesting.py | 1 | 37651 | # encoding: UTF-8
'''
本文件中包含的是CTA模块的回测引擎,回测引擎的API和CTA引擎一致,
可以使用和实盘相同的代码进行回测。
'''
from __future__ import division
from datetime import datetime, timedelta
from collections import OrderedDict
from itertools import product
import multiprocessing
import pymongo
from ctaBase import *
from ctaSetting import *
from vtCons... | mit |
evanl/comparison_scripts | output_t2_funcs.py | 1 | 33643 | #Author - Evan Leister
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import time
import string
from operator import itemgetter
import CO2Properties_1_0 as co2
class T2grid(object):
""" This class represents an overarching structure to post-process a
TOUGH2 simulation.
... | mit |
dronecrew/px4tools | px4tools/ulog.py | 1 | 38602 | """
ulog2pandas converter
"""
# pylint: disable=no-member, invalid-name, broad-except, too-many-locals
from __future__ import print_function
import os
import pickle
import re
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pyulog
import scipy.signal
import transforms3d.quaternions as q... | bsd-3-clause |
MaartenGr/BERTopic | bertopic/_bertopic.py | 1 | 73029 | import warnings
warnings.filterwarnings("ignore", category=FutureWarning)
warnings.filterwarnings("ignore", category=UserWarning)
import re
import joblib
import inspect
import numpy as np
import pandas as pd
from tqdm import tqdm
from scipy.sparse.csr import csr_matrix
from typing import List, Tuple, Union, Mapping, A... | mit |
kpj/SDEMotif | reaction_finder.py | 1 | 54567 | """
Find reactions via combinatoric investigations of data files
"""
import os
import csv
import copy
import pickle
import random
import itertools
import collections
import numpy as np
import pandas as pd
import networkx as nx
import scipy.stats as scis
import seaborn as sns
import matplotlib as mpl
import matplotli... | mit |
Transience/tracker | moving.py | 1 | 67455 | #! /usr/bin/env python
'''Libraries for moving objects, trajectories...'''
import utils
import cvutils
from math import sqrt
from numpy import median
try:
from shapely.geometry import Polygon, Point as shapelyPoint
from shapely.prepared import prep
shapelyAvailable = True
except ImportError:
print('S... | mit |
aschampion/diluvian | diluvian/regions.py | 1 | 33796 | # -*- coding: utf-8 -*-
from __future__ import division
import itertools
import logging
import matplotlib.animation as animation
import matplotlib.pyplot as plt
import numpy as np
import six
from six.moves import queue
from tqdm import tqdm
from .config import CONFIG
from .octrees import OctreeVolume
from .postpro... | mit |
breedlun/clearplot | clearplot/plot_functions.py | 1 | 53885 | # -*- coding: utf-8 -*-
#Created on Wed Sep 24 21:26:51 2014
#@author: Benjamin Reedlunn
import clearplot as _cp
from clearplot import figure as _figure
import matplotlib as _mpl
import numpy as _np
from clearplot import utilities as _utl
def _setup_plot(x_label, y_label, **kwargs):
"""
Read standard kwargs f... | mit |
johnmgregoire/vanDover_CHESS | xrd_fileIO_fcns.py | 1 | 132535 | global XRFALLOWED
try:
from xrf_analysis import *
XRFALLOWED=True
except:
XRFALLOWED=False
import numpy, pylab, matplotlib
from xrd_math_fcns import *
from xrd_diffraction_conversion_fcns import *
from XRDdefaults import *
from xrf_depprof import *
import os
import time
import h5py
import operator
#import... | bsd-3-clause |
nils-wisiol/pypuf | pypuf/studies/ipuf/split.py | 1 | 49618 | """
Divide-and-Conquer Attack Study on Interpose PUFs, as detailed in Wisiol et al., "Splitting the Interpose PUF: A Novel
Modeling Attack Strategy", CHES 2020.
"""
from os import getpid
from pprint import pprint
from typing import NamedTuple, List
from uuid import UUID
from matplotlib.legend_handler import HandlerTup... | gpl-3.0 |
eusoubrasileiro/fatiando | fatiando/seismic/wavefd.py | 1 | 68739 | r"""
Finite difference solution of the 2D wave equation for isotropic media.
Solutions are implemented as simulation classes taking advantage of Object
Orientation. They have Rich Display features of IPython Notebook and use
the HDF5 file format to store and persist the simulation objects.
**Sources**
* :class:`~fat... | bsd-3-clause |
sot/mica | mica/report/report.py | 1 | 36595 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import sys
import warnings
import re
import logging
import gzip
import jinja2
import datetime
import json
from glob import glob
import argparse
import matplotlib.pyplot as plt
import numpy as np
import tables
from six.moves import zip
from pathli... | bsd-3-clause |
ryfeus/lambda-packs | H2O/ArchiveH2O/tabulate.py | 1 | 59377 | # -*- coding: utf-8 -*-
"""Pretty-print tabular data."""
from __future__ import print_function
from __future__ import unicode_literals
from collections import namedtuple
from platform import python_version_tuple
import re
import math
if python_version_tuple() >= ("3", "3", "0"):
from collections.ab... | mit |
bachiraoun/fullrmc | Constraints/DistanceConstraints.py | 1 | 61375 | """
DistanceConstraints contains classes for all constraints related to
distances between atoms.
.. inheritance-diagram:: fullrmc.Constraints.DistanceConstraints
:parts: 1
"""
# standard libraries imports
from __future__ import print_function
import itertools, re, copy
# external libraries imports
import numpy as... | agpl-3.0 |
shisha101/grasp_SM | e2u/e2u_demo_setup/script/grasp.py | 1 | 84334 | #!/usr/bin/python
import rospy
import rospkg
import smach
import smach_ros
import tf
import sys
import copy
import std_srvs
import matplotlib.pyplot as plt
import numpy
import random
import pdb
from std_srvs.srv import Trigger, TriggerRequest, Empty
from geometry_msgs.msg import PoseStamped
from moveit_commander imp... | gpl-2.0 |
nistats/nistats | nistats/reporting/glm_reporter.py | 1 | 33618 | # -*- coding: utf-8 -*-
"""
Functionality to create an HTML report using a fitted GLM & contrasts.
Functions
---------
make_glm_report(model, contrasts):
Creates an HTMLDocument Object which can be viewed or saved as a report.
"""
import io
import os
import string
import warnings
from collections import Ordered... | bsd-3-clause |
femtotrader/ig-markets-stream-api-python-library | trading_ig/rest.py | 1 | 45890 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
IG Markets REST API Library for Python
http://labs.ig.com/rest-trading-api-reference
Original version by Lewis Barber - 2014 - http://uk.linkedin.com/in/lewisbarber/
Modified by Femto Trader - 2014-2015 - https://github.com/femtotrader/
""" # noqa
import json
import l... | bsd-3-clause |
McDermott-Group/Simulation | Mask Automation/core.py | 1 | 85354 | # -*- coding: utf-8 -*-
"""
The primary geometry elements, layout and organization classes.
The objects found here are intended to correspond directly to elements found in
the GDSII specification.
The fundamental gdsCAD object is the Layout, which contains all the information
to be sent to the mask shop. A Layout can... | gpl-2.0 |
xflin/spark | python/pyspark/sql/dataframe.py | 1 | 73648 | #
# 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.