repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
magne-max/zipline-ja | zipline/data/us_equity_pricing.py | 1 | 44232 | # Copyright 2015 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 writ... | apache-2.0 |
FCP-INDI/nipype | nipype/pipeline/engine/utils.py | 1 | 51285 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Utility routines for workflow graphs
"""
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
fro... | bsd-3-clause |
neilhan/tensorflow | tensorflow/contrib/learn/python/learn/estimators/estimator.py | 1 | 40164 | # 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 |
JeffHeard/terrapyn | geocms/drivers/postgis2.py | 1 | 37893 | # from ga_ows.views import wms, wfs
from django.db.models.loading import get_model
from django.utils.text import slugify
from uuid import uuid4
from zipfile import ZipFile
import json
from django.contrib.gis.geos import Polygon, GEOSGeometry
from django.core.files import File
import numpy
import os
from osgeo import os... | apache-2.0 |
airbnb/superset | superset/db_engine_specs/presto.py | 1 | 44415 | # 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 |
rubennj/pvlib-python | pvlib/clearsky.py | 1 | 37027 | """
The ``clearsky`` module contains several methods
to calculate clear sky GHI, DNI, and DHI.
"""
from __future__ import division
import logging
logger = logging.getLogger('pvlib')
import os
import numpy as np
import pandas as pd
from pvlib import tools
from pvlib import irradiance
from pvlib import atmosphere
f... | bsd-3-clause |
MapsPy/MapsPy | maps_generate_img_dat.py | 1 | 88104 | '''
Created on Nov 21, 2011
@author: Mirna Lerotic, 2nd Look Consulting
http://www.2ndlookconsulting.com/
Copyright (c) 2013, Stefan Vogt, Argonne National Laboratory
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the... | bsd-2-clause |
herilalaina/scikit-learn | sklearn/linear_model/omp.py | 8 | 31952 | """Orthogonal matching pursuit algorithms
"""
# Author: Vlad Niculae
#
# License: BSD 3 clause
import warnings
from math import sqrt
import numpy as np
from scipy import linalg
from scipy.linalg.lapack import get_lapack_funcs
from .base import LinearModel, _pre_fit
from ..base import RegressorMixin
from ..utils imp... | bsd-3-clause |
MSusik/invenio | invenio/legacy/webstat/engine.py | 1 | 105803 | ## This file is part of Invenio.
## Copyright (C) 2007, 2008, 2010, 2011, 2013, 2014 CERN.
##
## Invenio 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 option... | gpl-2.0 |
gakarak/BTBDB_ImageAnalysisSubPortal | app/core/segmct/fcnn_lung2d.py | 1 | 32103 | #!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = 'ar (Alexander Kalinovsky)'
import glob
import os
import sys
import time
import numpy as np
import json
from keras.backend.tensorflow_backend import set_session
import tensorflow as tf
import nibabel as nib
try:
import cPickle as pickle
except:
import pic... | apache-2.0 |
jhamman/xray | xarray/core/variable.py | 1 | 54258 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from datetime import timedelta
from collections import defaultdict
import functools
import itertools
from distutils.version import LooseVersion
import numpy as np
import pandas as pd
from . import common
from ... | apache-2.0 |
vorwerkc/pymatgen | pymatgen/analysis/pourbaix_diagram.py | 1 | 40810 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module is intended to be used to compute Pourbaix diagrams
of arbitrary compositions and formation energies. If you use
this module in your work, please consider citing the following:
General formalis... | mit |
nmartensen/pandas | pandas/core/categorical.py | 1 | 75172 | # 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 |
jobovy/apogee | apogee/spec/plot.py | 1 | 41842 | ###############################################################################
# apogee.spec.plot: various way to plot APOGEE spectra
###############################################################################
from functools import wraps
import numpy
from galpy.util import bovy_plot
from matplotlib import pyplot
i... | bsd-3-clause |
desihub/fiberassign | bin/sv1-summary.py | 1 | 92983 | #!/usr/bin/env python
import matplotlib
matplotlib.use("Agg")
import sys
import os
from glob import glob
import numpy as np
import fitsio
import astropy.io.fits as fits
from astropy.table import Table, vstack
from astropy import units, constants
from astropy.coordinates import SkyCoord
from astropy.time import Time
i... | bsd-3-clause |
treycausey/scikit-learn | sklearn/metrics/metrics.py | 1 | 76052 | # -*- coding: utf-8 -*-
"""Utilities to evaluate the predictive performance of models
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 <alexandr... | bsd-3-clause |
jfsehuanes/thunderfish | thunderfish/fishfinder.py | 1 | 36351 | import sys
import os
import warnings
import argparse
import numpy as np
from audioio import PlayAudio, fade
from .version import __version__
from .configfile import ConfigFile
from .harmonicgroups import add_psd_peak_detection_config, add_harmonic_groups_config, colors_markers
from .bestwindow import add_clip_config, a... | gpl-3.0 |
alexandrebarachant/mne-python | mne/cov.py | 2 | 77090 | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Matti Hamalainen <msh@nmr.mgh.harvard.edu>
# Denis A. Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
import copy as cp
from distutils.version import LooseVersion
import itertools as itt
from math import log
imp... | bsd-3-clause |
ThomasBrouwer/BNMTF | plots/convergence/plot_nmf_convergences.py | 1 | 51881 | """
Plot the convergence of the many different NMF algorithms in a single graph.
We run our method on the entire random dataset, so no test set.
We use a dataset of I=100, J=80, K=10, with unit mean priors and zero mean unit
variance noise.
We have the following methods:
- VB NMF
- Gibbs NMF
"""
import matplotlib.... | apache-2.0 |
OmkarPathak/pygorithm | tests/test_geometry.py | 1 | 95476 | import unittest
import math
import random
import sys
from pygorithm.geometry import (
rect_broad_phase,
vector2,
axisall,
line2,
polygon2,
rect2,
extrapolated_intersection
)
class TestCollisionDetection(unittest.TestCase):
def setUp(self):
# first pair of objects
se... | mit |
jmfranck/pyspecdata | pyspecdata/core.py | 1 | 389647 | r'''Provides the core components of pyspecdata.
Currently, this is a very large file that we will slowly break down into separate modules or packages.
The classes :class:`nddata`, :class:`nddata_hdf`, :class:`ndshape`, the
function :func:`plot`, and the class :class:`fitdata`
are the core components of the N-Dimension... | bsd-3-clause |
florian-f/sklearn | sklearn/ensemble/gradient_boosting.py | 1 | 40775 | """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. Regressio... | bsd-3-clause |
GuessWhoSamFoo/pandas | pandas/tests/io/parser/test_parse_dates.py | 2 | 34187 | # -*- coding: utf-8 -*-
"""
Tests date parsing functionality for all of the
parsers defined in parsers.py
"""
from datetime import date, datetime
import numpy as np
import pytest
import pytz
from pandas._libs.tslib import Timestamp
from pandas._libs.tslibs import parsing
from pandas.compat import StringIO, lrange, ... | bsd-3-clause |
huzq/scikit-learn | sklearn/linear_model/_coordinate_descent.py | 1 | 92118 | # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Olivier Grisel <olivier.grisel@ensta.org>
# Gael Varoquaux <gael.varoquaux@inria.fr>
#
# License: BSD 3 clause
import sys
import warnings
import numbers
from abc import ABCMeta, abstractm... | bsd-3-clause |
Alex-Ian-Hamilton/sunpy | sunpy/map/mapbase.py | 1 | 61230 | """
Map is a generic Map class from which all other Map classes inherit from.
"""
from __future__ import absolute_import, division, print_function
from sunpy.extern.six.moves import range
#pylint: disable=E1101,E1121,W0404,W0613
__authors__ = ["Russell Hewett, Stuart Mumford, Keith Hughitt, Steven Christe", "Jack Irel... | bsd-2-clause |
mperignon/bmi-delta | deltaRCM/deltaRCM_base.py | 1 | 40319 | from math import floor, sqrt
import numpy as np
from random import shuffle
from matplotlib import pyplot as plt
from scipy import ndimage
import sys, os, re, string
import pickle
from deltaRCM_tools import save_figure, random_pick, random_pick_list
class Tools(object):
_input_vars = {
'model_output__site... | mit |
allisony/pyspeckit | pyspeckit/spectrum/models/model.py | 1 | 44686 | """
=============================
Generic SpectralModel wrapper
=============================
.. moduleauthor:: Adam Ginsburg <adam.g.ginsburg@gmail.com>
"""
import numpy as np
from pyspeckit.mpfit import mpfit,mpfitException
from pyspeckit.spectrum.parinfo import ParinfoList,Parinfo
import copy
from astropy import lo... | mit |
migueldiascosta/pymatgen | pymatgen/analysis/diffusion_analyzer.py | 1 | 34675 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
A module to perform diffusion analyses (e.g. calculating diffusivity from
mean square displacements etc.). If you use this module, please consider
citing t... | mit |
eike-welk/clair | src/clairweb/collect/get_ebay.py | 1 | 40390 | # -*- coding: utf-8 -*-
###############################################################################
# Clair - Project to discover prices on e-commerce sites. #
# #
# Copyright (C) 2013 by Eike Welk ... | gpl-3.0 |
google/trax | trax/data/text_encoder.py | 1 | 44010 | # coding=utf-8
# Copyright 2021 The Trax 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 applicable law or a... | apache-2.0 |
canismarko/xanespy | xanespy/importers.py | 1 | 73655 | # -*- 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 |
yl565/statsmodels | statsmodels/genmod/tests/test_glm.py | 1 | 70857 | """
Test functions for models.GLM
"""
from __future__ import division
from statsmodels.compat import range
import os
import numpy as np
from numpy.testing import (assert_almost_equal, assert_equal, assert_raises,
assert_allclose, assert_, assert_array_less, dec)
from scipy import stats
impor... | bsd-3-clause |
dssg/diogenes | diogenes/display/display.py | 1 | 32976 | """Tools to visualize data and display results"""
import os
import shutil
import StringIO
import cgi
import uuid
import abc
from datetime import datetime
from collections import Counter
import itertools as it
import numpy as np
from diogenes import utils
import matplotlib
if utils.on_headless_server():
matplotli... | mit |
trevorstephens/gplearn | gplearn/genetic.py | 1 | 65915 | """Genetic Programming in Python, with a scikit-learn inspired API
The :mod:`gplearn.genetic` module implements Genetic Programming. These
are supervised learning methods based on applying evolutionary operations on
computer programs.
"""
# Author: Trevor Stephens <trevorstephens.com>
#
# License: BSD 3 clause
impor... | bsd-3-clause |
RPGOne/scikit-learn | sklearn/model_selection/tests/test_validation.py | 1 | 32784 | """Test the validation module"""
from __future__ import division
import sys
import warnings
import tempfile
import os
from time import sleep
import numpy as np
from scipy.sparse import coo_matrix, csr_matrix
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_false
from sklearn.uti... | bsd-3-clause |
cactusbin/nyt | matplotlib/lib/matplotlib/text.py | 1 | 70455 | """
Classes for including text in a figure.
"""
from __future__ import division, print_function
import math
import numpy as np
from matplotlib import cbook
from matplotlib import rcParams
import matplotlib.artist as artist
from matplotlib.artist import Artist
from matplotlib.cbook import is_string_like, maxdict
from ... | unlicense |
casey-h/MEOPAR_AIS | 02_Segment_Development/1_generate_tracks_from_AIS_DB_vectorized.py | 1 | 82523 | #!/usr/bin/python
# Split pre-parsed exactEarth position-referenced AIS data (Postgres Export)
# into basic movement data files on message type group. Requires GDAL / OGR/OSR, and
# progressbar2 packages for Python.
# Modifications
# 2018-06-26: Removed position accuracy from processed fields.
# 2018-09-20: Adding C... | mit |
SiLab-Bonn/MCA | analysis.py | 1 | 32464 | import tables
import numpy as np
import os
from scipy.optimize import curve_fit
import pylandau as landau
import matplotlib.pyplot as plt
from matplotlib.offsetbox import AnchoredText
import logging
import progressbar
class MCA_analysis(object):
'''
Collection of methods for analysis of LF Diode Teststruct... | gpl-2.0 |
MartinThoma/algorithms | ML/hasy/hasy_tools.py | 1 | 41847 | #!/usr/bin/env python
"""
Tools for the HASY dataset.
Type `./hasy_tools.py --help` for the command line tools and `help(hasy_tools)`
in the interactive Python shell for the module options of hasy_tools.
"""
import csv
import json
import logging
import os
import random
random.seed(0) # make sure results are reprod... | mit |
NixaSoftware/CVis | venv/lib/python2.7/site-packages/pandas/tests/test_algos.py | 1 | 56095 | # -*- coding: utf-8 -*-
import numpy as np
import pytest
from numpy.random import RandomState
from numpy import nan
from datetime import datetime
from itertools import permutations
from pandas import (Series, Categorical, CategoricalIndex,
Timestamp, DatetimeIndex,
Index, Inter... | apache-2.0 |
dkillick/cartopy | lib/cartopy/crs.py | 1 | 63202 | # (C) British Crown Copyright 2011 - 2015, Met Office
#
# This file is part of cartopy.
#
# cartopy is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option)... | lgpl-3.0 |
casmlab/quac | lib/geo/gmm.py | 2 | 44885 | '''This module contains models with a few variations on estimating locations
with fitted Gaussian mixture models (GMMs).'''
# Copyright (c) Los Alamos National Security, LLC, and others.
from collections import Counter, OrderedDict
import operator
import math
from pprint import pprint
import sys
import time
from... | apache-2.0 |
ryfeus/lambda-packs | Tensorflow_Pandas_Numpy/source3.6/pandas/core/indexes/category.py | 1 | 30900 | import operator
import numpy as np
from pandas._libs import index as libindex
from pandas import compat
from pandas.compat.numpy import function as nv
from pandas.core.dtypes.generic import ABCCategorical, ABCSeries
from pandas.core.dtypes.dtypes import CategoricalDtype
from pandas.core.dtypes.common import (
is_... | mit |
dacoex/pvlib-python | pvlib/irradiance.py | 1 | 71369 | """
The ``irradiance`` module contains functions for modeling
global horizontal irradiance, direct normal irradiance,
diffuse horizontal irradiance, and total irradiance
under various conditions.
"""
from __future__ import division
import logging
pvl_logger = logging.getLogger('pvlib')
import datetime
import numpy ... | bsd-3-clause |
kalaytan/findatapy | findatapy/market/datavendorbbg.py | 1 | 36118 | __author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# 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 l... | apache-2.0 |
terrycojones/dark-matter | dark/proteins.py | 1 | 43815 | from __future__ import division, print_function
import os
from collections import defaultdict, Counter
import numpy as np
from os.path import dirname, exists, join
from operator import itemgetter
import re
from six.moves.urllib.parse import quote
from textwrap import fill
from dark.dimension import dimensionalIterato... | mit |
freeitaly/Trading-System | vn.trader/ctaAlgo/ctaBacktesting.py | 1 | 36723 | # encoding: UTF-8
'''
本文件中包含的是CTA模块的回测引擎,回测引擎的API和CTA引擎一致,
可以使用和实盘相同的代码进行回测。
'''
from __future__ import division
from datetime import datetime, timedelta
from collections import OrderedDict
from itertools import product
import pymongo
from pymongo.errors import ConnectionFailure
import os
from ctaBase import *
from c... | mit |
dialounke/pylayers | pylayers/measures/cormoran.py | 1 | 164275 | # -*- coding:Utf-8 -*-
"""
This module handles CORMORAN measurement data
CorSer Class
============
.. autoclass:: CorSer
:members:
Notes
-----
Useful members
distdf : distance between radio nodes (122 columns)
devdf : device data frame
"""
#import mayavi.mlab as mlabc
import os
import pdb
import sys
import ... | mit |
YannickDieter/testbeam_analysis | testbeam_analysis/result_analysis.py | 1 | 104146 | ''' All functions creating results (e.g. efficiency, residuals, track density) from fitted tracks are listed here.'''
from __future__ import division
import logging
import re
from collections import Iterable
import os.path
import tables as tb
import numpy as np
from matplotlib.backends.backend_pdf import PdfPages
fro... | mit |
osigaud/ArmModelPython | Control/Plot/plotFunctions.py | 1 | 44157 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Author: Thomas Beucher
Module: plotFunction
Description: some plotting functions
'''
import random as rd
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib import animation
from matplotlib.mlab import ... | gpl-2.0 |
kris-singh/pgmpy | pgmpy/models/BayesianModel.py | 1 | 33677 | #!/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 |
zfrenchee/pandas | pandas/core/algorithms.py | 1 | 51607 | """
Generic data algorithms. This module is experimental at the moment and not
intended for public consumption
"""
from __future__ import division
from warnings import warn, catch_warnings
import numpy as np
from pandas.core.dtypes.cast import (
maybe_promote, construct_1d_object_array_from_listlike)
from pandas.c... | bsd-3-clause |
MJuddBooth/pandas | pandas/io/sql.py | 1 | 61031 | # -*- coding: utf-8 -*-
"""
Collection of query wrappers / abstractions to both facilitate data
retrieval and to reduce dependency on DB-specific API.
"""
from __future__ import division, print_function
from contextlib import contextmanager
from datetime import date, datetime, time
from functools import partial
impor... | bsd-3-clause |
aosagie/spark | python/pyspark/serializers.py | 1 | 30964 | #
# 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 |
rs2/pandas | pandas/tests/generic/test_generic.py | 1 | 30477 | from copy import copy, deepcopy
import numpy as np
import pytest
from pandas.compat.numpy import np_version_under1p17
from pandas.core.dtypes.common import is_scalar
import pandas as pd
from pandas import DataFrame, Series, date_range
import pandas._testing as tm
import pandas.core.common as com
# ----------------... | bsd-3-clause |
davidovitch/freeyaw-ojf-wt-tests | ojfpostproc.py | 1 | 112718 | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 10 20:00:37 2012
@author: dave
"""
# STANDARD LIBRARY
from __future__ import division
import os
#import timeit
# COMMON 3TH PARTY
import numpy as np
import scipy.io
import scipy.integrate as integrate
#from matplotlib.figure import Figure
#from matplotlib.backends.backe... | gpl-3.0 |
BNUCNL/ATT | algorithm/tools.py | 1 | 50475 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode:nil -*-
# vi: set ft=python sts=4 sw=4 et:
import copy
import numpy as np
import pandas as pd
from scipy import stats, special
from scipy.spatial import distance
def _overlap(c1, c2, index='dice'):
"""
Calculate overlap between two collections... | mit |
Ziqi-Li/bknqgis | pandas/pandas/core/indexes/multi.py | 1 | 94471 |
# pylint: disable=E1101,E1103,W0232
import datetime
import warnings
from functools import partial
from sys import getsizeof
import numpy as np
from pandas._libs import index as libindex, lib, Timestamp
from pandas.compat import range, zip, lrange, lzip, map
from pandas.compat.numpy import function as nv
from pandas ... | gpl-2.0 |
magic2du/contact_matrix | Contact_maps/DeepLearning/DeepLearningTool/DL_contact_matrix_load2-new10fold_04_07_2015_parallel.py | 1 | 43526 |
# coding: utf-8
# In[5]:
import sys, os
sys.path.append('../../../libs/')
sys.path.append('../libs/')
sys.path.append('../../libs/')
import os.path
import IO_class
from IO_class import FileOperator
from sklearn import cross_validation
import sklearn
import csv
from dateutil import parser
from datetime import timede... | gpl-2.0 |
strubell/Parser | network.py | 1 | 46864 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 Timothy Dozat
#
# 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 ... | apache-2.0 |
TNT-Samuel/Coding-Projects | DNS Server/Source - Copy/Lib/site-packages/dask/dataframe/io/tests/test_csv.py | 2 | 36880 | from __future__ import print_function, division, absolute_import
from io import BytesIO
import os
import gzip
from time import sleep
import pytest
pd = pytest.importorskip('pandas')
dd = pytest.importorskip('dask.dataframe')
from toolz import partition_all, valmap
import pandas.util.testing as tm
import dask
impor... | gpl-3.0 |
bnaul/scikit-learn | sklearn/cluster/_kmeans.py | 1 | 73100 | """K-means clustering"""
# Authors: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Thomas Rueckstiess <ruecksti@in.tum.de>
# James Bergstra <james.bergstra@umontreal.ca>
# Jan Schlueter <scikit-learn@jan-schlueter.de>
# Nelle Varoquaux
# Peter Prettenhofer <peter.prettenh... | bsd-3-clause |
mattloose/RUscripts | ReadUntil/aReadUntil.py | 1 | 54189 | #!/usr/bin/env python
from read_until import ReadUntil
import time
import errno
from socket import error as socket_error
import socket
import threading, thread
import sys, os, re
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.Alphabet import generic_dna
from StringIO import StringIO
import string
import mlpy
im... | mit |
adamrp/qiita | qiita_db/metadata_template/base_metadata_template.py | 1 | 44887 | r"""
Metadata template objects (:mod: `qiita_db.metadata_template)
=============================================================
..currentmodule:: qiita_db.metadata_template
This module provides the MetadataTemplate base class and the subclasses
SampleTemplate and PrepTemplate.
Classes
-------
..autosummary::
:... | bsd-3-clause |
cherry-wb/SideTools | life/doublecolor.py | 1 | 32238 | # -*- coding: utf-8 -*-
'''
@author: cherry
@license: GNU General Public License 2.0 or later
@contact: chery.wb@gmail.com
'''
from PySide import QtCore, QtGui
from PySide.QtGui import QApplication
from PySide.QtGui import QMainWindow
import sys,os
import random
import numpy as np
import matplotlib.py... | apache-2.0 |
cbertinato/pandas | pandas/tests/groupby/test_grouping.py | 1 | 32667 | """ test where we are determining what we are grouping, or getting groups """
import numpy as np
import pytest
import pandas as pd
from pandas import (
CategoricalIndex, DataFrame, Index, MultiIndex, Series, Timestamp,
date_range)
from pandas.core.groupby.grouper import Grouping
import pandas.util.testing as ... | bsd-3-clause |
jangorecki/h2o-3 | h2o-py/h2o/h2o.py | 1 | 56786 | # -*- encoding: utf-8 -*-
"""
h2o -- module for using H2O services.
:copyright: (c) 2016 H2O.ai
:license: Apache License Version 2.0 (see LICENSE for details)
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import os
import warnings
from h2o.backend import H2OC... | apache-2.0 |
SiLab-Bonn/testbeam_analysis | testbeam_analysis/tools/plot_utils.py | 1 | 63216 | from __future__ import division
import logging
import re
import os.path
import warnings
from math import ceil
import numpy as np
import tables as tb
import matplotlib as mpl
from matplotlib.backends.backend_pdf import PdfPages
from matplotlib.backends.backend_agg import FigureCanvas
import matplotlib.pyplot as plt
fr... | mit |
gengliangwang/spark | python/pyspark/pandas/utils.py | 1 | 33357 | #
# 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 |
abelfunctions/abelfunctions | abelfunctions/riemann_surface_path.py | 1 | 37528 | r"""Riemann Surface Paths :mod:`abelfunctions.riemann_surface_path`
Module for defining paths on Riemann surfaces. A basic Riemann surface path
consists of the Riemann surface on which it's defined, a
:class:`ComplexPathPrimitive` defining the x-projection of the path, and a
starting y-fibre. The first element of the ... | mit |
anhaidgroup/py_entitymatching | py_entitymatching/dask/dask_rule_based_blocker.py | 1 | 43154 | import logging
from collections import OrderedDict
import pandas as pd
import numpy as np
import pyprind
import six
import dask
from dask import delayed
from dask.diagnostics import ProgressBar
from py_stringmatching.tokenizer.qgram_tokenizer import QgramTokenizer
from py_stringmatching.tokenizer.whitespace_tokenize... | bsd-3-clause |
RRCKI/pilot | Experiment.py | 1 | 40712 | # Class definition:
# Experiment
# This class is the main experiment class; ATLAS etc will inherit from this class
# Instances are generated with ExperimentFactory
# Subclasses should implement all needed methods prototyped in this class
# Note: not compatible with Singleton Design Pattern due to the subclass... | apache-2.0 |
dmnfarrell/epitopemap | modules/mhcpredict/base.py | 1 | 37657 | #!/usr/bin/env python
"""
MHC prediction base module for core classes
Created November 2013
Copyright (C) Damien Farrell
"""
import sys, os, shutil, string
import csv, glob, pickle
import time, StringIO
import operator as op
import re, types
import subprocess
from subprocess import CalledProcessError
impo... | apache-2.0 |
jtladner/Scripts | bowtie_buildout/bowtie_buildout_latest_wQualchecks.py | 1 | 40650 | #!/usr/bin/env python
# By Jason Ladner
###!!! Requires installations of samtools, bedtools(genomeCoverageBed) and bowtie2, both of which must reside within your $PATH
from __future__ import division
import sys, optparse, os, datetime
from subprocess import Popen, PIPE
#For plotting
import matplotlib
matplotlib.use(... | gpl-3.0 |
qiime2/qiime2 | qiime2/metadata/metadata.py | 1 | 39894 | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause |
dmnfarrell/peat | pKaTool/activity_fit/fit_pHact_J.py | 1 | 39040 | #!/usr/bin/env python
#
# pKaTool - analysis of systems of titratable groups
# Copyright (C) 2010 Jens Erik Nielsen
#
# 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 Lice... | mit |
kanchenxi04/vnpy-app | vn.trader/ctaAlgo/strategy_TripleMa_v0.5.py | 1 | 37255 | # encoding: UTF-8
# 首先写系统内置模块
import sys
from datetime import datetime, timedelta, date
from time import sleep
# 其次,导入vnpy的基础模块
import sys
sys.path.append('..')
from vtConstant import EMPTY_STRING, EMPTY_INT, DIRECTION_LONG, DIRECTION_SHORT, OFFSET_OPEN, STATUS_CANCELLED,EMPTY_FLOAT
# 然后是自己编写的模块
from ct... | mit |
parttimenerd/temci | temci/report/stats.py | 1 | 56588 | """
Statistical helper classes for tested pairs and single blocks.
"""
import logging
import os
from collections import defaultdict
from enum import Enum
import itertools
import math
from temci.report.rundata import RunData
from temci.report.testers import Tester, TesterRegistry
from temci.utils.settings import Sett... | gpl-3.0 |
gregstarr/PyGPS | gps.py | 1 | 35454 | #!/usr/bin/env python
"""
Greg Starr
this is based mostly on Bill Rideout's tec.py
scripts, I'm not using classes and I am using
numpy because I like it better, the rinex
reading was made by Michael Hirsch and Greg Starr
"""
from __future__ import division,absolute_import,print_function
from pathlib import Path
import ... | agpl-3.0 |
tedmeeds/tcga_encoder | tcga_encoder/analyses/everything_tissue.py | 1 | 98246 | from tcga_encoder.utils.helpers import *
from tcga_encoder.data.data import *
from tcga_encoder.analyses.everything_functions import *
from tcga_encoder.analyses.everything_long import *
from tcga_encoder.analyses.survival_functions import *
import networkx as nx
#try:
from networkx.drawing.nx_agraph import graphviz_la... | mit |
dborgesr/Euplotid | euplotid/buildAnnotateINs.py | 1 | 63909 | import numpy as np, scipy as sp, sys, os, myvariant, mygene, json, multiprocessing, pysam, subprocess
import re, textwrap, networkx as nx, community, requests, argparse, uuid, pandas as pd, glob, shutil
import pickle
from joblib import Parallel, delayed
from networkx.utils import open_file, make_str
from Bio import Seq... | gpl-3.0 |
cabrer7/PyWignerCUDA | GPU_WignerDiracKvN2D_4x4.py | 1 | 144987 | #!/usr/local/epd/bin/python
#------------------------------------------------------------------------------------------------------
#
# Dirac propagator in the phase space x-px
#
#------------------------------------------------------------------------------------------------------
import numpy as np
import scipy.fft... | mit |
ryfeus/lambda-packs | Keras_tensorflow_nightly/source2.7/tensorflow/contrib/metrics/python/ops/metric_ops.py | 1 | 168497 | # 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... | mit |
JonasWallin/BayesFlow | src/hier_GMM_MPI.py | 1 | 49315 | from __future__ import division
'''
Created on Jul 10, 2014
@author: jonaswallin
'''
from mpi4py import MPI
import numpy as np
import numpy.random as npr
import os
import glob
import time
import warnings
import traceback
import sys
import json
import matplotlib.pyplot as plt
#from mpl_toolkits.mplot3d import Axes3D
f... | gpl-2.0 |
jopohl/urh | tests/awre/AWRExperiments.py | 1 | 35470 | import array
import multiprocessing
import os
import random
import time
from collections import defaultdict
import matplotlib.pyplot as plt
import numpy as np
from tests.awre.AWRETestCase import AWRETestCase
from tests.utils_testing import get_path_for_data_file
from urh.awre.FormatFinder import FormatFinder
from urh... | gpl-3.0 |
nilearn/nilearn_sandbox | nilearn_sandbox/mass_univariate/rpbi.py | 1 | 33824 | """
Randomized Parcellation Based Inference
"""
# Authors: Virgile Fritsch <virgile.fritsch@inria.fr>, feb. 2014
# Benoit Da Mota, jun. 2013
import numpy as np
from scipy import stats, sparse
import sklearn.externals.joblib as joblib
from sklearn.externals.joblib import Memory
from sklearn.utils import gen_ev... | bsd-3-clause |
yl565/statsmodels | statsmodels/tsa/statespace/tests/test_varmax.py | 1 | 34509 | """
Tests for VARMAX models
Author: Chad Fulton
License: Simplified-BSD
"""
from __future__ import division, absolute_import, print_function
import numpy as np
import pandas as pd
import os
import re
import warnings
from statsmodels.tsa.statespace import mlemodel, varmax
from .results import results_varmax
from nump... | bsd-3-clause |
LinkedEarth/Pyleoclim_util | pyleoclim/utils/wavelet.py | 1 | 86015 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 25 08:14:31 2020
@author: deborahkhider
Functions concerning wavelet analysis
"""
__all__ = [
'cwt',
'wwz',
'xwc',
]
import numpy as np
import statsmodels.api as sm
from scipy import signal
from pathos.multiprocessing import Processi... | gpl-3.0 |
theflofly/tensorflow | tensorflow/tools/compatibility/tf_upgrade_v2_test.py | 1 | 60327 | # Copyright 2018 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 |
jreback/pandas | pandas/io/formats/style.py | 1 | 57222 | """
Module for applying conditional formatting to DataFrames and Series.
"""
from collections import defaultdict
from contextlib import contextmanager
import copy
from functools import partial
from itertools import product
from typing import (
Any,
Callable,
DefaultDict,
Dict,
List,
Optional,
... | bsd-3-clause |
louispotok/pandas | pandas/tests/reshape/test_pivot.py | 1 | 80817 | # -*- coding: utf-8 -*-
from datetime import datetime, date, timedelta
import pytest
import numpy as np
from collections import OrderedDict
import pandas as pd
from pandas import (DataFrame, Series, Index, MultiIndex,
Grouper, date_range, concat, Categorical)
from pandas.core.reshape.pivot impo... | bsd-3-clause |
jpn--/larch | tests/test_numba.py | 1 | 42875 | import pytest
numba = pytest.importorskip("numba")
from larch.examples import MTC, SWISSMETRO
from pytest import approx, raises, warns, fixture
import numpy as np
import pandas as pd
from larch.roles import P, X, PX
from larch.model.persist_flags import PERSIST_UTILITY
from larch.numba.model import NumbaModel
@fixtur... | gpl-3.0 |
maheshakya/scikit-learn | sklearn/linear_model/coordinate_descent.py | 2 | 71569 | # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Olivier Grisel <olivier.grisel@ensta.org>
# Gael Varoquaux <gael.varoquaux@inria.fr>
#
# License: BSD 3 clause
import sys
import warnings
from abc import ABCMeta, abstractmethod
import n... | bsd-3-clause |
fabiansinz/pipeline | python/pipeline/utils/caiman_interface.py | 1 | 30929 | """Interface to the CaImAn package (https://github.com/simonsfoundation/CaImAn)."""
import numpy as np
import multiprocessing as mp
from caiman import components_evaluation
from caiman.utils import visualization
from caiman.source_extraction.cnmf import map_reduce, initialization, pre_processing, \
... | lgpl-3.0 |
jreback/pandas | pandas/tests/io/excel/test_writers.py | 1 | 50514 | from datetime import date, datetime, timedelta
from functools import partial
from io import BytesIO
import os
import numpy as np
import pytest
import pandas.util._test_decorators as td
import pandas as pd
from pandas import DataFrame, Index, MultiIndex, get_option, set_option
import pandas._testing as tm
from panda... | bsd-3-clause |
mperrin/misc_astro | constellations.py | 1 | 54735 | import numpy as np
import matplotlib as plt
import pylab
def constellations(plot=False, plot3d=False, color='blue', radius=None, greatcircles=True):
""" Plot constellation patterns, in 2D or 3D.
This does not provide extraordinarily high precision; it's just a cosmetic display that sketches out
the appr... | bsd-3-clause |
baklanovp/pystella | pystella/rf/light_curve_plot.py | 1 | 32867 | import os
import sys
from itertools import cycle
from collections import OrderedDict
import numpy as np
from pystella.rf import band
try:
import matplotlib.pyplot as plt
from matplotlib import gridspec
except ImportError as ex:
# import traceback
exc_type, exc_obj, exc_tb = sys.exc_info()
fn = os.... | mit |
lcrobert/PySA | PySA_2_20170915.py | 1 | 129866 | # -*- coding: utf-8 -*-
import sys
import os
from PySide import QtCore, QtGui
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import matplotlib.ticker as tick
tick.MultipleLocator(base=25.0)
from PIL import Image
path = ""#img path
box = np.array([0,0,0],dtype=int)#(y1,... | apache-2.0 |
toobaz/pandas | pandas/io/formats/style.py | 1 | 47195 | """
Module for applying conditional formatting to
DataFrames and Series.
"""
from collections import defaultdict
from contextlib import contextmanager
import copy
from functools import partial
from itertools import product
from uuid import uuid1
import numpy as np
from pandas._config import get_option
from pandas.c... | bsd-3-clause |
wxgeo/geophar | wxgeometrie/sympy/plotting/plot.py | 1 | 65073 | """Plotting module for Sympy.
A plot is represented by the ``Plot`` class that contains a reference to the
backend and a list of the data series to be plotted. The data series are
instances of classes meant to simplify getting points and meshes from sympy
expressions. ``plot_backends`` is a dictionary with all the bac... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.