repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
j-wags/POVME | clustering/cluster.py | 1 | 42576 | # Implementation of Clustering Algorithms in POVME
# By Celia Wong
# Advised by Jeff Wagner
# Amaro Lab, UCSD
import scipy.cluster.vq, scipy.cluster.hierarchy
import argparse
import numpy
import sys
import os
import csv
import copy
import itertools
import collections
#import fnmatch
import pylab
import peel
#import ma... | gpl-3.0 |
JamesPHoughton/pysd | tests/unit_test_external.py | 1 | 109704 | import os
import unittest
from importlib.machinery import SourceFileLoader
import numpy as np
import xarray as xr
_root = os.path.dirname(__file__)
_exp = SourceFileLoader('expected_data', 'data/expected_data.py').load_module()
class TestExcels(unittest.TestCase):
"""
Tests for Excels class
"""
def ... | mit |
louispotok/pandas | pandas/tests/tseries/test_frequencies.py | 1 | 30951 | from datetime import datetime, timedelta
from pandas.compat import range
import pytest
import numpy as np
from pandas import (Index, DatetimeIndex, Timestamp, Series,
date_range, period_range)
from pandas._libs.tslibs.frequencies import (_period_code_map,
... | bsd-3-clause |
philrosenfield/TPAGB-calib | tpagb_calibration/sfhs/vary_sfh.py | 1 | 30558 | """
Run many trilegal simulations and cull scaled LF functions to compare with data
"""
import argparse
import logging
import numpy as np
import os
import sys
import time
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pylab as plt
import ResolvedStellarPops as rsp
from IPython import parallel
from ..pop_sy... | bsd-3-clause |
CodeMonkeyJan/hyperspy | hyperspy/_signals/eds.py | 1 | 43465 | # -*- 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 |
radiasoft/optics | tests/utilities/uti_io_genesis.py | 1 | 42919 | #############################################################################
#This is a subset of Gianluca's and Ilya's module to read-in Genesis output files
#and to generate SRW wavefront structure
#############################################################################
#from mpi4py import MPI
#comm = MPI.COM... | apache-2.0 |
DTOcean/dtocean-core | example_data/fixed_tidal_staggered_layout_scenario.py | 1 | 35190 | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 09 10:39:38 2015
@author: 108630
"""
import os
import numpy as np
import pandas as pd
from scipy.stats import multivariate_normal, norm
from dtocean_core.utils.moorings import get_moorings_tables
# Note that the electrical folder in the test_data directory should be
#... | gpl-3.0 |
dsm054/pandas | pandas/core/indexes/interval.py | 1 | 43571 | """ define the IntervalIndex """
import textwrap
import warnings
import numpy as np
from pandas.compat import add_metaclass
from pandas.core.dtypes.missing import isna
from pandas.core.dtypes.cast import (
find_common_type, maybe_downcast_to_dtype, infer_dtype_from_scalar)
from pandas.core.dtypes.common import (
... | bsd-3-clause |
vinodkc/spark | python/pyspark/pandas/frame.py | 1 | 427638 | #
# 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 |
daleloogn/rp_extract | rp_extract.py | 1 | 39663 | '''
RP_extract: Rhythm Patterns Audio Feature Extractor
@author: 2014-2015 Alexander Schindler, Thomas Lidy
Re-implementation by Alexander Schindler of RP_extract for Matlab
Matlab version originally by Thomas Lidy, based on Musik Analysis Toolbox by Elias Pampalk
( see http://ifs.tuwien.ac.at/mir/downloads.html )
... | gpl-3.0 |
tarasane/h2o-3 | h2o-py/h2o/frame.py | 1 | 51569 | # -*- coding: utf-8 -*-
# import numpy no numpy cuz windoz
import collections, csv, itertools, os, re, tempfile, uuid, urllib2, sys, urllib,imp,copy,weakref
from expr import h2o,ExprNode
import gc
from group_by import GroupBy
# TODO: Automatically convert column names into Frame properties!
class H2OFrameWeakRef... | apache-2.0 |
desihub/desitarget | py/desitarget/io.py | 1 | 156322 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
desitarget.io
=============
Functions for reading, writing and manipulating files related to targeting.
"""
from __future__ import (absolute_import, division)
#
import numpy as np
# import pandas as pd
import fitsio
from astrop... | bsd-3-clause |
TomAugspurger/pandas | pandas/tests/plotting/test_series.py | 1 | 34515 | """ Test cases for Series.plot """
from datetime import datetime
from itertools import chain
import numpy as np
from numpy.random import randn
import pytest
import pandas.util._test_decorators as td
import pandas as pd
from pandas import DataFrame, Series, date_range
import pandas._testing as tm
from pandas.tests.... | bsd-3-clause |
johnnycakes79/pyops | pyops/edf.py | 1 | 39722 | import pandas as pd
import os
# from prettytable import PrettyTable
class EDF:
"""Experiment Description File Parser
Attributes:
ACTIONS (Object): Contains all the actions data in the file
AREAS (Object): Contains all the Areas data in the file
CONSTRAINTS (Object): Contains all the c... | bsd-3-clause |
astrotuvi/pyplate | pyplate/process/process.py | 1 | 98748 | import os
import glob
import shutil
import sys
import math
import datetime as dt
import subprocess as sp
import numpy as np
import warnings
import xml.etree.ElementTree as ET
from astropy import __version__ as astropy_version
from astropy import wcs
from astropy.io import fits, votable
from astropy.table import Table, ... | apache-2.0 |
3324fr/spinalcordtoolbox | dev/atlas/validate_atlas/plot_snr_and_tracts_std.py | 1 | 31044 | #!/usr/bin/env python
__author__ = 'Simon_2'
# ======================================================================================================================
# Extract results from .txt files generated by " " and draw box-and-whisker plots comparing the absolute error of
# estimation using the different metr... | mit |
quantopian/zipline | zipline/testing/fixtures.py | 1 | 80775 | import os
import sqlite3
from unittest import TestCase
import warnings
from logbook import NullHandler, Logger
import numpy as np
import pandas as pd
from pandas.core.common import PerformanceWarning
from six import with_metaclass, iteritems, itervalues, PY2
import responses
from toolz import flip, groupby, merge
from... | apache-2.0 |
microsoft/EconML | econml/tests/test_drlearner.py | 1 | 59859 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import numpy as np
import unittest
import pytest
import pickle
from sklearn.base import TransformerMixin
from numpy.random import normal, multivariate_normal, binomial
from sklearn.exceptions import DataConversionWarning
from... | mit |
brakhane/panda3d | makepanda/makepanda.py | 1 | 325526 | #!/usr/bin/env python
########################################################################
#
# To build panda using this script, type 'makepanda.py' on unix
# or 'makepanda.bat' on windows, and examine the help-text.
# Then run the script again with the appropriate options to compile
# panda3d.
#
##################... | bsd-3-clause |
tyiannak/pyAudioAnalysis | pyAudioAnalysis/audioTrainTest.py | 1 | 48544 | from __future__ import print_function
import sys
import numpy as np
import os
import glob
import pickle as cPickle
import csv
import ntpath
from pyAudioAnalysis import MidTermFeatures as aF
from pyAudioAnalysis import audioBasicIO
from scipy import linalg as la
from scipy.spatial import distance
import sklearn.svm
impo... | apache-2.0 |
gkunter/coquery | coquery/corpusbuilder.py | 1 | 80763 | # -*- coding: utf-8 -*-
"""
corpusbuilder.py is part of Coquery.
Copyright (c) 2016-2019 Gero Kunter (gero.kunter@coquery.org)
Coquery is released under the terms of the GNU General Public License (v3).
For details, see the file LICENSE that you should have received along
with Coquery. If not, see <http://www.gnu.org... | gpl-3.0 |
mraspaud/dask | dask/dataframe/tests/test_dataframe.py | 1 | 89705 | import sys
from operator import add
from itertools import product
import pandas as pd
import pandas.util.testing as tm
import numpy as np
import pytest
import dask
from dask.utils import ignoring, put_lines
import dask.dataframe as dd
from dask.dataframe.core import repartition_divisions, aca, _concat, Scalar
from d... | bsd-3-clause |
ziiin/Berkeley-big-data-spark | W-4/lab3_text_analysis_and_entity_resolution_student (2).py | 1 | 61029 |
# coding: utf-8
# version 1.0.3
# # + 
# # **Text Analysis and Entity Resolution**
# ####Entity resolution is a common, yet diff... | mit |
migueldiascosta/pymatgen | pymatgen/symmetry/bandstructure.py | 2 | 32521 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
Created on March 25, 2013
@author: geoffroy
"""
import numpy as np
from math import ceil
from math import cos
from math import sin
from math import tan
... | mit |
josh146/pyctqw | pyCTQW/MPI/ctqw.py | 1 | 129691 | #!/usr/bin/python
#
# This file provides an interface from the pyCTQW.MPI python module
# to the libctqwMPI.so FORTRAN library contained in source code src/ctqwMPI.F90
# ----------------------------------------------------------------------------
# pyCTQW - Distributed memory CTQW Fortran library and Python module
... | gpl-3.0 |
macronucleus/chromagnon | Chromagnon/Priithon/useful.py | 1 | 109146 | """priithon U modules: lot's of simple 'useful' (shortcut) functions
"""
from __future__ import print_function
__author__ = "Sebastian Haase <haase@msg.ucsf.edu>"
__license__ = "BSD license - see LICENSE file"
#from __future__ import generators
import numpy as N
try:
from scipy import ndimage as nd
except Import... | mit |
nmartensen/pandas | pandas/io/pytables.py | 1 | 161676 | """
High level interface to PyTables for reading and writing pandas data structures
to disk
"""
# pylint: disable-msg=E1101,W0613,W0603
from datetime import datetime, date
import time
import re
import copy
import itertools
import warnings
import os
from pandas.core.dtypes.common import (
is_list_like,
is_cate... | bsd-3-clause |
gauribhoite/personfinder | env/google_appengine/google/appengine/api/appinfo.py | 1 | 73467 | #!/usr/bin/env python
#
# Copyright 2007 Google 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 o... | apache-2.0 |
winklerand/pandas | pandas/core/indexing.py | 1 | 76948 | # pylint: disable=W0223
import textwrap
import warnings
import numpy as np
from pandas.compat import range, zip
import pandas.compat as compat
from pandas.core.dtypes.generic import ABCDataFrame, ABCPanel, ABCSeries
from pandas.core.dtypes.common import (
is_integer_dtype,
is_integer, is_float,
is_list_like... | bsd-3-clause |
harisbal/pandas | pandas/tests/test_resample.py | 1 | 139479 | # pylint: disable=E1101
from warnings import catch_warnings, simplefilter
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
from pandas._libs.tslibs.period import Incompatib... | bsd-3-clause |
hendrikwout/pynacolada | pynacolada/apply_func_new.py | 1 | 41284 | import numpy as np
import math
import xarray as xr
import os
import netCDF4 as nc4
import pandas as pd
from tqdm import tqdm
import tempfile
import logging
logging.basicConfig(level=logging.DEBUG)
def apply_func(func,xarrays,dims_apply, method_dims_no_apply='outer',filenames_out = None, attributes = None,maximum_inpu... | gpl-3.0 |
smartscheduling/scikit-learn-categorical-tree | sklearn/ensemble/forest.py | 1 | 59354 | """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 |
jmmauricio/pypstools | build/lib.linux-x86_64-2.7/pypstools/publisher.py | 2 | 55611 | """ Tools for plotting and publishing power system simulations and analysis results.
(c) 2015 Juan Manuel Mauricio
https://www.packtpub.com/books/content/plotting-geographical-data-using-basemap
"""
from __future__ import division, print_function
import numpy as np
import scipy.linalg
import matplotlib.pyplot as p... | gpl-3.0 |
dicortazar/ceres | cereslib/events/events.py | 1 | 35417 | #!/usr/bin/python
# Copyright (C) 2016 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 version.
#
# This program is di... | lgpl-3.0 |
danielwe/gridcell | gridcell/imaps.py | 1 | 81474 | #!/usr/bin/env python
"""File: imaps.py
Module defining classes to represent intensity maps, with methods for
convolving, correlating, smoothing, computing Fourier transforms, plotting,
peak detection etc.
"""
# Copyright 2015 Daniel Wennberg
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you m... | apache-2.0 |
SKIRT/PTS | magic/tools/scatter_density.py | 1 | 35242 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | agpl-3.0 |
tsherwen/AC_tools | AC_tools/generic.py | 1 | 39098 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Generic functions for use with GEOS-Chem/Data Analysis.
Use help(<name of function>) to get details on a particular function.
NOTE(S):
- This module is underdevelopment vestigial/inefficient code is being removed/updated.
- Where external code is used credit is given.
"... | mit |
Rubenknex/qtplot | qtplot/data.py | 1 | 36032 | import os
import logging
from collections import OrderedDict
import numpy as np
from scipy import ndimage, interpolate, io
from scipy.spatial import qhull
import json, codecs
from .util import FixedOrderFormatter, eng_format
logger = logging.getLogger(__name__)
class DatFile:
""" Class which contains the colum... | mit |
WangWenjun559/Weiss | summary/sumy/sklearn/metrics/classification.py | 1 | 62607 | """Metrics to assess performance on classification task given classe 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.gram... | apache-2.0 |
gimli-org/gimli | pygimli/physics/traveltime/refraction.py | 1 | 37019 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Class for managing seismic refraction data and doing inversions"""
from math import pi
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.collections import LineCollection
import pygimli as pg
import pygimli.meshtools as mt
from pygimli.viewer.mpl imp... | apache-2.0 |
phobson/mpl-probscale | probscale/tests/test_viz.py | 1 | 31370 | import numpy
import matplotlib.lines
import matplotlib.pyplot as plt
try:
from scipy import stats
except ImportError: # pragma: no cover
stats = None
try:
import seaborn
except ImportError: # pragma: no cover
seaborn = None
from probscale import viz
from probscale.probscale import _minimal_norm
fro... | bsd-3-clause |
kdmurray91/scikit-bio | skbio/metadata/_testing.py | 1 | 36975 | # ----------------------------------------------------------------------------
# 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 |
danieldmm/minerva | models/seq2seq_translation_tutorial.py | 1 | 30221 | # -*- coding: utf-8 -*-
"""
Translation with a Sequence to Sequence Network and Attention
*************************************************************
**Author**: `Sean Robertson <https://github.com/spro/practical-pytorch>`_
In this project we will be teaching a neural network to translate from
French to English.
::... | gpl-3.0 |
toobaz/pandas | pandas/core/ops/__init__.py | 1 | 55420 | """
Arithmetic operations for PandasObjects
This is not a public API.
"""
import datetime
import operator
import textwrap
from typing import Any, Callable
import warnings
import numpy as np
from pandas._libs import Timedelta, Timestamp, lib, ops as libops
from pandas.errors import NullFrequencyError
from pandas.util... | bsd-3-clause |
dssg/wikienergy | disaggregator/build/pandas/pandas/tools/tests/test_pivot.py | 1 | 33953 | import datetime
import numpy as np
from numpy.testing import assert_equal
import pandas as pd
from pandas import DataFrame, Series, Index, MultiIndex, Grouper
from pandas.tools.merge import concat
from pandas.tools.pivot import pivot_table, crosstab
from pandas.compat import range, u, product
import pandas.util.testi... | mit |
MJuddBooth/pandas | pandas/tests/frame/test_dtypes.py | 1 | 41658 | # -*- coding: utf-8 -*-
from __future__ import print_function
from collections import OrderedDict
from datetime import timedelta
import numpy as np
import pytest
from pandas.compat import u
from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype
import pandas as pd
from pandas import (
Categor... | bsd-3-clause |
dquartul/BLonD | blond/beam/distributions_multibunch.py | 1 | 38355 | '''
**Module to generate multibunch distributions**
:Authors: **Danilo Quartullo**, **Alexandre Lasheen**, **Theodoros Argyropoulos**
'''
from __future__ import division, print_function, absolute_import
from builtins import range
import numpy as np
import copy
import matplotlib.pyplot as plt
from scipy.integrate impo... | gpl-3.0 |
petebachant/TurbineDAQ | turbinedaq.py | 1 | 53024 | #!/usr/bin/env python
"""TurbineDAQ main app module."""
from __future__ import division, print_function
from PyQt4 import QtCore, QtGui
from PyQt4.QtGui import *
import numpy as np
from acspy import acsc
from modules import daqtasks
from modules import vectasks
from modules import runtypes
from modules.mainwindow impo... | gpl-3.0 |
tulip5/tulip | doc/python/tabulate.py | 1 | 56776 | # -*- coding: utf-8 -*-
# Copyright (c) 2011-2017 Sergey Astanin
# https://bitbucket.org/astanin/python-tabulate
# 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, includ... | lgpl-3.0 |
karamarielynch/dss-df | dss_data_fitter.py | 1 | 38976 | import sys
from PyQt4 import QtGui, QtCore
import pyqtgraph as pg
import numpy as np
import matplotlib.pyplot as plt
from scipy.odr import odrpack as odr
import scipy.integrate as integrate
import lineshape
from datetime import datetime
class FitDSSData(QtGui.QMainWindow):
def __init__(self):
... | mit |
CompPhysics/MachineLearning | doc/LectureNotes/_build/jupyter_execute/chapter10.py | 1 | 65162 | # Building a Feed Forward Neural Network
We are now gong to develop an example based on the MNIST data
base. This is a classification problem and we need to use our
cross-entropy function we discussed in connection with logistic
regression. The cross-entropy defines our cost function for the
classificaton problems wit... | cc0-1.0 |
SyntaxVoid/PyFusionGUI | pyfusion/clustering/clustering.py | 1 | 200346 | '''
Shaun Haskey : 2May2013
Many routines for clustering and plotting.
'''
import numpy as np
import matplotlib.pyplot as pt
import math, time, copy, itertools, multiprocessing, os
from sklearn import mixture
from scipy.cluster import vq
from scipy.stats.distributions import vonmises
from scipy.stats.distributions im... | gpl-3.0 |
weaponsjtu/Kaggle_xBle | model_library.py | 1 | 36626 | import pandas as pd
import numpy as np
import cPickle as pickle
import os
from sklearn import preprocessing
from sklearn.preprocessing import StandardScaler
from sklearn.decomposition import TruncatedSVD
from sklearn.ensemble import RandomForestRegressor, ExtraTreesRegressor, GradientBoostingRegressor
from sklearn.ens... | gpl-2.0 |
dongsenfo/pymatgen | pymatgen/analysis/defects/utils.py | 1 | 56190 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import math
from monty.json import MSONable
import itertools
import pandas as pd
import numpy as np
from numpy.linalg import norm
import logging
from collections import defaultdict
from scipy.spatial import... | mit |
ocastany/Berreman4x4 | Berreman4x4.py | 1 | 58361 | # Encoding: utf-8
# Copyright (C) 2012-2016 Olivier Castany
# This program is free software (see LICENCE file)
"""Berreman4x4: module implementing Berreman's 4x4 matrix method.
See file "documentation.pdf"
"""
import numpy
import scipy.linalg
from numpy import pi, newaxis
import matplotlib, matplotlib.pyplot
#####... | gpl-3.0 |
datapythonista/pandas | pandas/tests/window/test_rolling.py | 1 | 42531 | from datetime import (
datetime,
timedelta,
)
import numpy as np
import pytest
from pandas.errors import UnsupportedFunctionCall
from pandas import (
DataFrame,
DatetimeIndex,
MultiIndex,
Series,
Timedelta,
Timestamp,
date_range,
period_range,
to_datetime,
to_timedelta... | bsd-3-clause |
PYPIT/PYPIT | pypeit/core/coadd.py | 1 | 63163 | """ Class for coaddition
"""
#from __future__ import absolute_import, division, print_function
import numpy as np
from numpy.ma.core import MaskedArray
import scipy
from matplotlib import pyplot as plt
from matplotlib import gridspec
from matplotlib.backends.backend_pdf import PdfPages
from astropy.io import fits
fr... | gpl-3.0 |
ProjectPyRhO/PyRhO | pyrho/protocols.py | 1 | 61501 | """
Stimulation protocols to run on the opsin models
* Neuro-engineering stimuli: ``step``, ``sinusoid``, ``chirp``, ``ramp``, ``delta``
* Opsin-specific protocols: ``rectifier``, ``shortPulse``, ``recovery``.
* The ``custom`` protocol can be used with arbitrary interpolation fuctions
"""
from __future__ i... | bsd-3-clause |
itsmeludo/PhylOligo | phylopackage/bin/phyloligo.py | 1 | 38846 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# START LICENCE ##############################################################
#
# Cluster read based on oligonucleotide profiles (microcomposition) distances
# Copyright (C) 2016 Ludovic Mallet, Tristan Bitard-Feidel
#
# This program is free software: you can redistribu... | gpl-3.0 |
janekg89/flutype_webapp | flutype/views.py | 1 | 31407 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import sys
from rest_framework.decorators import api_view
from rest_framework.response import Response
from django.contrib.auth.models import User
from django.http import JsonResponse,HttpResponseForbidden,Http404
from .helper import generate_tr... | lgpl-3.0 |
oscarbranson/latools | latools/latools.py | 1 | 173423 | """
Main functions for interacting with LAtools.
(c) Oscar Branson : https://github.com/oscarbranson
"""
import configparser
import itertools
import inspect
import json
import os
import re
import time
import warnings
import dateutil
import textwrap
import matplotlib.pyplot as plt
import matplotlib as mpl
import nump... | mit |
camisatx/pySecMaster | pySecMaster/utilities/database_queries.py | 1 | 68556 | from datetime import datetime, timedelta
import numpy as np
import pandas as pd
import psycopg2
from sqlalchemy import create_engine
__author__ = 'Josh Schertz'
__copyright__ = 'Copyright (C) 2018 Josh Schertz'
__description__ = 'An automated system to store and maintain financial data.'
__email__ = 'josh[AT]joshscher... | agpl-3.0 |
pombredanne/dask | dask/dataframe/tests/test_dataframe.py | 1 | 91645 | from itertools import product
from datetime import datetime
from operator import getitem
from distutils.version import LooseVersion
import pandas as pd
import pandas.util.testing as tm
import numpy as np
import pytest
from numpy.testing import assert_array_almost_equal
import dask
from dask.async import get_sync
from... | bsd-3-clause |
blaze/dask | dask/dataframe/shuffle.py | 1 | 41562 | import contextlib
from collections import defaultdict
import logging
import math
import shutil
import operator
import uuid
import tempfile
import tlz as toolz
import numpy as np
import pandas as pd
from .core import DataFrame, Series, _Frame, _concat, map_partitions, new_dd_object
from .. import base, config
from ..... | bsd-3-clause |
zfrenchee/pandas | pandas/tests/sparse/frame/test_frame.py | 1 | 47971 | # 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.indexes.datetimes import DatetimeIndex
from pandas.tseries.offsets import BDay
fro... | bsd-3-clause |
wilsonkichoi/zipline | tests/test_history.py | 1 | 66801 | from textwrap import dedent
from numbers import Real
from nose_parameterized import parameterized
import numpy as np
from numpy import nan
from numpy.testing import assert_almost_equal
import pandas as pd
from six import iteritems
from zipline import TradingAlgorithm
from zipline._protocol import handle_non_market_m... | apache-2.0 |
rmichie/TTools | Step4_MeasureTopographicAngles.py | 1 | 42467 | ########################################################################
# TTools
# Step 4: Measure Topographic Angles - v 0.97
# Ryan Michie
# Measure_Topographic_Angles will take an input point feature
# (from Step 1) and calculate the maximum topographic elevation
# and the the slope angle from each node in differ... | gpl-3.0 |
chleh/pvd-tool | src/pvd_tool.py | 1 | 48176 | #!/usr/bin/python
#
# Copyright (C) 2015 Christoph Lehmann
#
# This file is part of pvd-tool.
#
# pvd-tool 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)... | gpl-3.0 |
AustereCuriosity/astropy | astropy/wcs/wcs.py | 1 | 124365 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Under the hood, there are 3 separate classes that perform different
parts of the transformation:
- `~astropy.wcs.Wcsprm`: Is a direct wrapper of the core WCS
functionality in `wcslib`_. (This includes TPV and TPD
polynomial distortion, b... | bsd-3-clause |
jdmcbr/geopandas | geopandas/tests/test_geodataframe.py | 1 | 35283 | import json
import os
import shutil
import tempfile
from distutils.version import LooseVersion
import numpy as np
import pandas as pd
import pyproj
from pyproj import CRS
from pyproj.exceptions import CRSError
from shapely.geometry import Point
import geopandas
from geopandas import GeoDataFrame, GeoSeries, read_fil... | bsd-3-clause |
socialsensor/community-evolution-analysis | python/CommunityRanking.py | 1 | 50181 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Name:
# Purpose: This .py file extracts adjacency lists and detects communities
# from the corresponding timeslots.
#
# Required libs: python-dateutil,pyparsing,numpy,ma... | apache-2.0 |
darcamo/pyphysim | pyphysim/cell/cell.py | 1 | 99414 | #!/usr/bin/env python
"""Module that implements Cell and Cluster related classes."""
try:
# noinspection PyUnresolvedReferences
# noinspection PyUnresolvedReferences
from matplotlib import patches
from matplotlib import pyplot as plt
_MATPLOTLIB_AVAILABLE = True
except ImportError: # pragma: no c... | gpl-2.0 |
Ralf3/samt2 | src/grid.py | 1 | 104705 | import cython
cimport cython
import numpy as np
cimport numpy as np
import csv
import re
import h5py
import pywt
import pylab as plt
from mpl_toolkits.mplot3d import Axes3D
import scipy.signal as signal
from scipy.interpolate import Rbf
from scipy.interpolate import RectBivariateSpline
import scipy.ndimage
import datet... | gpl-3.0 |
montoyjh/pymatgen | pymatgen/io/abinit/flows.py | 1 | 117326 | # 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).
"""
import os
import sy... | mit |
cython-testbed/pandas | pandas/tests/internals/test_internals.py | 1 | 48791 | # -*- coding: utf-8 -*-
# pylint: disable=W0102
from datetime import datetime, date
import operator
import sys
import pytest
import numpy as np
import re
from distutils.version import LooseVersion
import itertools
from pandas import (Index, MultiIndex, DataFrame, DatetimeIndex,
Series, Categorical... | bsd-3-clause |
dismalpy/dismalpy | dismalpy/ssm/compat/dynamic_factor.py | 1 | 57729 | """
Dynamic factor model
Author: Chad Fulton
License: Simplified-BSD
"""
from __future__ import division, absolute_import, print_function
from warnings import warn
from statsmodels.compat.collections import OrderedDict
import numpy as np
import pandas as pd
from .mlemodel import MLEModel, MLEResults, MLEResultsWrapp... | bsd-2-clause |
ClimbsRocks/scikit-learn | sklearn/model_selection/tests/test_search.py | 1 | 38341 | """Test the search module"""
from collections import Iterable, Sized
from sklearn.externals.six.moves import cStringIO as StringIO
from sklearn.externals.six.moves import xrange
from itertools import chain, product
import pickle
import sys
import numpy as np
import scipy.sparse as sp
from sklearn.utils.fixes import ... | bsd-3-clause |
toobaz/pandas | pandas/tests/groupby/test_categorical.py | 1 | 38869 | from collections import OrderedDict
from datetime import datetime
import numpy as np
import pytest
from pandas.compat import PY37
import pandas as pd
from pandas import (
Categorical,
CategoricalIndex,
DataFrame,
Index,
MultiIndex,
Series,
qcut,
)
import pandas.util.testing as tm
from pan... | bsd-3-clause |
jreback/pandas | pandas/tests/resample/test_period_index.py | 2 | 33720 | from datetime import datetime
import dateutil
import numpy as np
import pytest
import pytz
from pandas._libs.tslibs.ccalendar import DAYS, MONTHS
from pandas._libs.tslibs.period import IncompatibleFrequency
from pandas.errors import InvalidIndexError
import pandas as pd
from pandas import DataFrame, Series, Timestam... | bsd-3-clause |
OSSHealth/ghdata | augur/routes/contributor_reports.py | 1 | 61673 | import psycopg2
import sqlalchemy as salc
import numpy as np
import warnings
import datetime
import pandas as pd
import json
from math import pi
from flask import request, send_file, Response
warnings.filterwarnings('ignore')
#import visualization libraries
from bokeh.io import export_png
from bokeh.embed import json_... | mit |
jhamman/xarray | xarray/core/common.py | 1 | 50724 | import warnings
from contextlib import suppress
from html import escape
from textwrap import dedent
from typing import (
Any,
Callable,
Dict,
Hashable,
Iterable,
Iterator,
List,
Mapping,
Tuple,
TypeVar,
Union,
)
import numpy as np
import pandas as pd
from . import dtypes, d... | apache-2.0 |
yanchen036/tensorflow | tensorflow/contrib/metrics/python/ops/metric_ops_test.py | 2 | 278671 | # 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 |
AntonGagin/GSAS_USE | patchSystErrors/originalOld/GSASIIdataGUI.py | 1 | 404526 | # -*- coding: utf-8 -*-
#GSASIIdataGUI - Main GUI routines
########### SVN repository information ###################
# $Date: 2018-07-18 23:46:38 +0300 (Wed, 18 Jul 2018) $
# $Author: vondreele $
# $Revision: 3485 $
# $URL: https://subversion.xray.aps.anl.gov/pyGSAS/trunk/GSASIIdataGUI.py $
# $Id: GSASIIdataGUI... | gpl-3.0 |
wesm/ibis | ibis/expr/api.py | 1 | 52273 | # Copyright 2015 Cloudera 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 writing, so... | apache-2.0 |
tardis-sn/tardisanalysis | tardis_kromer_plot.py | 1 | 37750 | """A simple plotting tool to create spectral diagnostics plots similar to those
originally proposed by M. Kromer (see, for example, Kromer et al. 2013, figure
4).
"""
import logging
import numpy as np
import astropy.units as units
import astropy.constants as csts
import pandas as pd
try:
import astropy.modeling.bl... | bsd-3-clause |
socolofs/tamoc | tamoc/single_bubble_model.py | 1 | 38813 | """
Single Bubble Model
===================
Simulate the trajectory of a particle rising through the water column
This module defines the classes, methods, and functions necessary to simulate
the rise of a single particle (bubble, droplet or solid particle) through the
water column. The ambient water properties are p... | mit |
jaeilepp/eggie | mne/label.py | 1 | 72262 | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Denis Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
from collections import defaultdict
from colorsys import hsv_to_rgb, rgb_to_hsv
from os import path as op
impor... | bsd-2-clause |
nwbt/HydraPlatform | HydraServer/python/HydraServer/soap_server/hydra_complexmodels.py | 1 | 55049 | # (c) Copyright 2013, 2014, University of Manchester
#
# HydraPlatform is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# HydraPlatfor... | gpl-3.0 |
lfairchild/PmagPy | pmagpy/convert_2_magic.py | 1 | 446893 | #!/usr/bin/env/pythonw
import sys
import os
from functools import reduce
import pytz
import datetime
import copy
import scipy
import numpy as np
import math
import pandas as pd
import pmagpy.pmag as pmag
import pmagpy.contribution_builder as cb
### _2g_bin_magic conversion
def _2g_bin(dir_path=".", mag_file="", mea... | bsd-3-clause |
Silmathoron/nest-simulator | pynest/nest/lib/hl_api_spatial.py | 1 | 45069 | # -*- coding: utf-8 -*-
#
# hl_api_spatial.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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,... | gpl-2.0 |
hschovanec-usgs/magpy | magpy/mpplot.py | 1 | 110686 | '''
Path: magpy.mpplot
Part of package: stream (plot)
Type: Library of matplotlib plotting functions
PURPOSE:
This script provides multiple functions for plotting a stream as well
as analysing various properties of a stream.
All plots are done with pyt... | gpl-3.0 |
energyPATHWAYS/energyPATHWAYS | energyPATHWAYS/demand.py | 1 | 217531 | __author__ = 'Ben Haley & Ryan Jones'
import config as cfg
import shape
import util
from datamapfunctions import DataMapFunctions
import numpy as np
import pandas as pd
from collections import defaultdict
import copy
from datetime import datetime
from demand_subsector_classes import DemandStock, SubDemand, ServiceEffi... | mit |
pjryan126/solid-start-careers | store/api/zillow/venv/lib/python2.7/site-packages/pandas/tests/series/test_indexing.py | 1 | 60069 | # coding=utf-8
# pylint: disable-msg=E1101,W0612
from datetime import datetime, timedelta
from numpy import nan
import numpy as np
import pandas as pd
from pandas import Index, Series, DataFrame, isnull, date_range
from pandas.core.index import MultiIndex
from pandas.core.indexing import IndexingError
from pandas.ts... | gpl-2.0 |
naripok/cryptotrader | cryptotrader/envs/trading.py | 1 | 94743 | """
Trading environment class
data: 12/10/2017
author: Tau
"""
from ..datafeed import *
from ..spaces import *
from .utils import *
from ..utils import *
from ..core import Env
import os
import smtplib
from socket import gaierror
from datetime import datetime, timedelta, timezone
from decimal import localcontext, ROUN... | mit |
guillermo-carrasco/bcbio-nextgen | bcbio/pipeline/qcsummary.py | 1 | 49963 | """Quality control and summary metrics for next-gen alignments and analysis.
"""
import collections
import contextlib
import csv
import os
import glob
import shutil
import subprocess
import pandas as pd
import lxml.html
import yaml
from datetime import datetime
from collections import defaultdict
# allow graceful duri... | mit |
adi-sharma/RLIE_A3C | code/server_multiprocessing.py | 1 | 62206 | import zmq, time
import numpy as np
import copy
import sys, json, pdb, pickle, operator, collections
import helper
import predict as predict
from train import load_data
from itertools import izip
import inflect
from sklearn.metrics.pairwise import cosine_similarity
from sklearn.feature_extraction.text import TfidfVecto... | mit |
biorack/metatlas | tests/unit/conftest.py | 1 | 91258 | """
per-directory pytest configuration
fixtures used across multiple files should go in here
"""
# pylint: disable=missing-function-docstring,unused-argument,line-too-long,too-many-lines,too-many-arguments
import getpass
import logging
import os
import sqlite3
import threading
import pytest
import numpy as np
import ... | bsd-3-clause |
great-expectations/great_expectations | great_expectations/expectations/core/expect_column_kl_divergence_to_be_less_than.py | 1 | 42325 | from typing import Dict, Optional
import altair as alt
import numpy as np
import pandas as pd
from scipy import stats as stats
from great_expectations.core import ExpectationConfiguration
from great_expectations.execution_engine import ExecutionEngine
from great_expectations.execution_engine.util import (
build_c... | apache-2.0 |
billbrod/spatial-frequency-preferences | sfp/combine_across_subjects.py | 1 | 37686 | """functions to combine GLMdenoise outputs across subjects
several steps to this
1. Interpolate all subjects' GLMdenoise models outputs (that is, the
amplitude estimate bootstraps) to fsaverage prior space (so all
subjects have same number of vertices)
2. Calculate each subject's precision (precision is the in... | mit |
groschatchauve/xCluster | server/flask/application/app.py | 1 | 32018 | # coding: utf-8
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
"""
Python Flask backend pour xCLuster
"""
# Ressources génériques
import datetime
import json
import os
import shutil
import stat
import zipfile
import time
import pyclamd
# BOKEH
from bokeh.plotting import figure, show, output_file, save
from bok... | unlicense |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.