repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
bmilde/ambientsearch | python/keyword_extract_w2v.py | 1 | 32756 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Jonas Wacker, Benjamin Milde'
import nltk
import codecs
import io
import re
from topia.termextract import extract
import os.path
import os
import sys
import gensim
import time
import itertools
import math
from sklearn.cluster import KMeans, AffinityPropagati... | apache-2.0 |
kelseyoo14/Wander | venv_2_7/lib/python2.7/site-packages/pandas/tests/test_index.py | 9 | 235131 | # -*- coding: utf-8 -*-
# pylint: disable=E1101,E1103,W0232
from datetime import datetime, timedelta, time
from pandas.compat import range, lrange, lzip, u, zip, PY3
import operator
import re
import nose
import warnings
import os
import numpy as np
from pandas import (period_range, date_range, Categorical, Series,
... | artistic-2.0 |
librosa/librosa | librosa/display.py | 1 | 48857 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Display
=======
Data visualization
------------------
.. autosummary::
:toctree: generated/
specshow
waveshow
Axis formatting
---------------
.. autosummary::
:toctree: generated/
TimeFormatter
NoteFormatter
SvaraFormatter
LogHzFormat... | isc |
NixaSoftware/CVis | venv/lib/python2.7/site-packages/pandas/tests/indexing/test_multiindex.py | 6 | 50377 | from warnings import catch_warnings
import pytest
import numpy as np
import pandas as pd
from pandas import (Panel, Series, MultiIndex, DataFrame,
Timestamp, Index, date_range)
from pandas.util import testing as tm
from pandas.errors import PerformanceWarning, UnsortedIndexError
from pandas.tests.in... | apache-2.0 |
alekz112/statsmodels | statsmodels/tsa/statespace/mlemodel.py | 6 | 32737 | """
State Space Model
Author: Chad Fulton
License: Simplified-BSD
"""
from __future__ import division, absolute_import, print_function
import numpy as np
import pandas as pd
from scipy.stats import norm
from .kalman_filter import FilterResults
import statsmodels.tsa.base.tsa_model as tsbase
from .model import Model
... | bsd-3-clause |
CompPhysics/MachineLearning | doc/src/LectureNotes/testbook/_build/jupyter_execute/chapter4.py | 3 | 36560 | # Work, Energy, Momentum and Conservation laws
Energy conservation is most convenient as a strategy for addressing
problems where time does not appear. For example, a particle goes
from position $x_0$ with speed $v_0$, to position $x_f$; what is its
new speed? However, it can also be applied to problems where time
doe... | cc0-1.0 |
mwickert/scikit-dsp-comm | sk_dsp_comm/fec_conv.py | 1 | 40339 | """
A Convolutional Encoding and Decoding
Copyright (c) March 2017, Mark Wickert
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyrig... | bsd-2-clause |
gfyoung/pandas | pandas/core/arrays/base.py | 1 | 48673 | """
An interface for extending pandas with custom arrays.
.. warning::
This is an experimental API and subject to breaking changes
without warning.
"""
from __future__ import annotations
import operator
from typing import (
Any,
Callable,
Dict,
Optional,
Sequence,
Tuple,
Type,
T... | bsd-3-clause |
jaredweiss/nupic | external/linux32/lib/python2.6/site-packages/matplotlib/patches.py | 69 | 110325 | # -*- coding: utf-8 -*-
from __future__ import division
import math
import matplotlib as mpl
import numpy as np
import matplotlib.cbook as cbook
import matplotlib.artist as artist
import matplotlib.colors as colors
import matplotlib.transforms as transforms
from matplotlib.path import Path
# these are not available ... | gpl-3.0 |
TheUpshot/Bedfellows | overall.py | 1 | 64014 | import csv, sys
from sys import stdout
from pandas import *
import MySQLdb
import numpy as np
from main import commit_changes, handle_error, check_contributor_id, check_recipient_id
INFINITY = 9999999999999
def main(db):
cursor = db.cursor()
print "Overall scores"
option = raw_input("Do you want to com... | mit |
jshleap/StructBio | Moduler.py | 1 | 98719 | #!/usr/bin/python
"""
Moduler Copyright (C) 2012 Jose Sergio Hleap, Kyle Nguyen, Alex Safatli and Christian Blouin
Graph based Modularity.
This script will evaluate the data for modules. Such modules are defined as correlating variables, so the clustering
is performed in the correlation space. It has an optional sta... | gpl-3.0 |
cbertinato/pandas | pandas/plotting/_matplotlib/converter.py | 1 | 37774 | import datetime as pydt
from datetime import datetime, timedelta
import warnings
from dateutil.relativedelta import relativedelta
import matplotlib.dates as dates
from matplotlib.ticker import AutoLocator, Formatter, Locator
from matplotlib.transforms import nonsingular
import matplotlib.units as units
import numpy as... | bsd-3-clause |
jimmycallin/master-thesis | architectures/conll16st-hd-sdp/sup_parser_v6_hierarchy_cnn_cross.py | 1 | 56209 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Sample Discourse Relation Classifier Train
Train parser for suplementary evaluation
Train should take three arguments
$inputDataset = the folder of the dataset to parse.
The folder structure is the same as in the tar file
$inputDataset/parses.json
$inputDataset... | mit |
kushalbhola/MyStuff | Practice/PythonApplication/env/Lib/site-packages/pandas/tests/frame/test_to_csv.py | 1 | 46866 | import csv
from io import StringIO
import os
import numpy as np
import pytest
from pandas.errors import ParserError
import pandas as pd
from pandas import (
DataFrame,
Index,
MultiIndex,
Series,
Timestamp,
date_range,
read_csv,
to_datetime,
)
import pandas.core.common as com
from pand... | apache-2.0 |
cdsgroup/qcdb | qcdb/origdbwrap.py | 2 | 106567 | from __future__ import print_function
from __future__ import absolute_import
import os
import sys
import math
try:
import cPickle as pickle
except ImportError:
import pickle
import itertools
try:
from collections import OrderedDict
except ImportError:
from .oldpymodules import OrderedDict
from .exceptio... | lgpl-3.0 |
LeeKamentsky/CellProfiler | cellprofiler/settings.py | 1 | 143936 | """ Setting.py - represents a module setting
CellProfiler is distributed under the GNU General Public License.
See the accompanying file LICENSE for details.
Copyright (c) 2003-2009 Massachusetts Institute of Technology
Copyright (c) 2009-2015 Broad Institute
All rights reserved.
Please see the AUTHORS file for cred... | gpl-2.0 |
mbkumar/pymatgen | pymatgen/analysis/adsorption.py | 4 | 31568 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module provides classes used to enumerate surface sites
and to find adsorption sites on slabs
"""
import numpy as np
from pymatgen import Structure, vis
import itertools
import os
from monty.serializ... | mit |
ArijanaBrlek/superset | superset/connectors/druid/models.py | 1 | 39537 | # pylint: disable=invalid-unary-operand-type
from collections import OrderedDict
import json
import logging
from copy import deepcopy
from datetime import datetime, timedelta
from six import string_types
import requests
import sqlalchemy as sa
from sqlalchemy import (
Column, Integer, String, ForeignKey, Text, Boo... | apache-2.0 |
yavalvas/yav_com | build/matplotlib/lib/matplotlib/axes/_axes.py | 1 | 259914 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
from six.moves import reduce, xrange, zip
import math
import warnings
import itertools
import numpy as np
from numpy import ma
import matplotlib
rcParams = matplotlib.rcParams
import matplotlib.c... | mit |
victor-prado/broker-manager | environment/lib/python3.5/site-packages/pandas/tseries/tests/test_tslib.py | 7 | 66821 | import nose
from distutils.version import LooseVersion
import numpy as np
from pandas import tslib, lib
import pandas._period as period
import datetime
import pandas as pd
from pandas.core.api import (Timestamp, Index, Series, Timedelta, Period,
to_datetime)
from pandas.tslib import get_t... | mit |
gpetretto/pymatgen | pymatgen/analysis/surface_analysis.py | 2 | 66309 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
TODO:
-Still assumes individual elements have their own chempots
in a molecular adsorbate instead of considering a single
chempot for a single molecular adsorbate. E.g. for an OH
... | mit |
mwaskom/lyman | lyman/workflows/model.py | 1 | 30767 | from __future__ import division
import os
import os.path as op
import numpy as np
import pandas as pd
import nibabel as nib
from scipy import ndimage
from nipype import Workflow, Node, JoinNode, IdentityInterface, DataSink
from nipype.interfaces.base import traits, TraitedSpec, Bunch
from .. import glm, signals
from... | bsd-3-clause |
mehdidc/scikit-learn | sklearn/ensemble/gradient_boosting.py | 4 | 61737 | """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 |
tomsilver/nupic | external/linux32/lib/python2.6/site-packages/matplotlib/collections.py | 69 | 39876 | """
Classes for the efficient drawing of large collections of objects that
share most properties, e.g. a large number of line segments or
polygons.
The classes are not meant to be as flexible as their single element
counterparts (e.g. you may not be able to select all line styles) but
they are meant to be fast for com... | gpl-3.0 |
crpurcell/RMpipeL5 | Imports/util_plotTk.py | 1 | 58341 | #!/usr/bin/env python
#=============================================================================#
# #
# NAME: util_plotTk.py #
# ... | mit |
krez13/scikit-learn | sklearn/model_selection/tests/test_split.py | 17 | 37397 | """Test the split module"""
from __future__ import division
import warnings
import numpy as np
from scipy.sparse import coo_matrix
from scipy import stats
from scipy.misc import comb
from itertools import combinations
from sklearn.utils.fixes import combinations_with_replacement
from sklearn.utils.testing import asse... | bsd-3-clause |
kambysese/mne-python | mne/preprocessing/ica.py | 3 | 119114 | # -*- coding: utf-8 -*-
#
# Authors: Denis A. Engemann <denis.engemann@gmail.com>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Juergen Dammers <j.dammers@fz-juelich.de>
#
# License: BSD (3-clause)
from inspect import isfunction
from collections import namedtuple
from copy import deepcopy
from... | bsd-3-clause |
lancezlin/ml_template_py | lib/python2.7/site-packages/pandas/tseries/tests/test_timeseries.py | 7 | 216448 | # pylint: disable-msg=E1101,W0612
import calendar
import operator
import sys
import warnings
from datetime import datetime, time, timedelta
from numpy.random import rand
import nose
import numpy as np
import pandas.index as _index
import pandas.lib as lib
import pandas.tslib as tslib
from pandas.types.common import i... | mit |
eudoxos/woodem | py/utils.py | 2 | 40822 | # encoding: utf-8
#
# utility functions for woo
#
# 2008-2009 © Václav Šmilauer <eudoxos@arcig.cz>
"""Heap of functions that don't (yet) fit anywhere else.
"""
import math,random,doctest
import woo, woo.dem, woo.core
import sys,os,warnings
from minieigen import *
from woo.dem import *
from woo.fem import *
from woo.... | gpl-2.0 |
jayhetee/dask | dask/array/core.py | 1 | 76284 | from __future__ import absolute_import, division, print_function
import operator
from operator import add, getitem
import inspect
from numbers import Number
from collections import Iterable, MutableMapping
from bisect import bisect
from itertools import product, count
from collections import Iterator
from functools im... | bsd-3-clause |
Sklearn-HMM/scikit-learn-HMM | sklean-hmm/linear_model/stochastic_gradient.py | 3 | 42863 | # Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author)
# Mathieu Blondel (partial_fit support)
#
# License: BSD 3 clause
"""Classification and regression using Stochastic Gradient Descent (SGD)."""
import numpy as np
import scipy.sparse as sp
from abc import ABCMeta, abstractmethod
import... | bsd-3-clause |
wasade/american-gut-web | amgut/lib/locale_data/british_gut.py | 1 | 109108 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
from amgut.lib.config_manager import AMGUT_CONFIG
# -----------------------------------------------------------------------------
# Copyright (c) 2014--, The American Gut Project Development Team.
#
# Distributed under the terms of the BSD 3... | bsd-3-clause |
alexeyum/scikit-learn | sklearn/model_selection/tests/test_search.py | 6 | 37722 | """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 |
krez13/scikit-learn | sklearn/metrics/tests/test_common.py | 21 | 41166 | from __future__ import division, print_function
from functools import partial
from itertools import product
import numpy as np
import scipy.sparse as sp
from sklearn.datasets import make_multilabel_classification
from sklearn.preprocessing import LabelBinarizer
from sklearn.utils.multiclass import type_of_target
fro... | bsd-3-clause |
Transkribus/TranskribusDU | TranskribusDU/tasks/TablePrototypes/DU_ABPTableRG4.py | 1 | 38067 | # -*- coding: utf-8 -*-
"""
DU task for ABP Table: doing jointly row BIESO and horizontal grid lines
block2line edges do not cross another block.
Here we make consistent label when any N grid lines have no block in-between
each other.
In that case, those N grid lines must have consistent... | bsd-3-clause |
pianomania/scikit-learn | sklearn/linear_model/logistic.py | 13 | 67587 | """
Logistic Regression
"""
# Author: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Fabian Pedregosa <f@bianp.net>
# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Manoj Kumar <manojkumarsivaraj334@gmail.com>
# Lars Buitinck
# Simon Wu <s8wu@uwaterloo.ca>
imp... | bsd-3-clause |
victor-prado/broker-manager | environment/lib/python3.5/site-packages/pandas/formats/style.py | 7 | 32536 | """
Module for applying conditional formatting to
DataFrames and Series.
"""
from functools import partial
from itertools import product
from contextlib import contextmanager
from uuid import uuid1
import copy
from collections import defaultdict, MutableMapping
try:
from jinja2 import Template
except ImportError:
... | mit |
stevenzhang18/Indeed-Flask | lib/pandas/core/groupby.py | 9 | 140196 | import types
from functools import wraps
import numpy as np
import datetime
import collections
import warnings
import copy
from pandas.compat import(
zip, builtins, range, long, lzip,
OrderedDict, callable, filter, map
)
from pandas import compat
from pandas.core.base import PandasObject
from pandas.core.cate... | apache-2.0 |
runt18/nupic | external/linux32/lib/python2.6/site-packages/matplotlib/figure.py | 1 | 38389 | """
The figure module provides the top-level
:class:`~matplotlib.artist.Artist`, the :class:`Figure`, which
contains all the plot elements. The following classes are defined
:class:`SubplotParams`
control the default spacing of the subplots
:class:`Figure`
top level container for all plot elements
"""
impo... | agpl-3.0 |
BillFoland/daisyluAMR | system/daisylu_vectors.py | 1 | 74777 | # 12/9/16, made this AMR specific, eliminating the need to parse srl vectors.
#
# DaisyLu Vectors 10/8/2015
#
# Read in the original conll format files and the list of items represented by each feature.
# Create MySQLite database with everything necessary to generate vectors for specific models,
# in Lua, including:
#... | mit |
idlead/scikit-learn | sklearn/tree/tree.py | 5 | 40442 | """
This module gathers tree-based methods, including decision, regression and
randomized trees. Single and multi-output problems are both handled.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Brian Holt <bdholt1@gmail.com>
# Noel Da... | bsd-3-clause |
fspaolo/scikit-learn | sklearn/metrics/metrics.py | 2 | 72648 | # -*- 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 |
bartosh/zipline | zipline/data/minute_bars.py | 1 | 47223 | # Copyright 2016 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 |
toobaz/pandas | pandas/core/arrays/timedeltas.py | 2 | 37182 | from datetime import timedelta
import textwrap
from typing import List
import warnings
import numpy as np
from pandas._libs import lib, tslibs
from pandas._libs.tslibs import NaT, Timedelta, Timestamp, iNaT
from pandas._libs.tslibs.fields import get_timedelta_field
from pandas._libs.tslibs.timedeltas import (
arr... | bsd-3-clause |
bsipocz/statsmodels | statsmodels/duration/hazard_regression.py | 16 | 60858 | import numpy as np
from statsmodels.base import model
import statsmodels.base.model as base
from statsmodels.tools.decorators import cache_readonly
from scipy.optimize import brent
"""
Implementation of proportional hazards regression models for duration
data that may be censored ("Cox models").
References
----------... | bsd-3-clause |
DGrady/pandas | pandas/core/series.py | 2 | 102152 | """
Data structure for 1-dimensional cross-sectional and time series data
"""
from __future__ import division
# pylint: disable=E1101,E1103
# pylint: disable=W0703,W0622,W0613,W0201
import types
import warnings
from textwrap import dedent
import numpy as np
import numpy.ma as ma
from pandas.core.dtypes.common impor... | bsd-3-clause |
magic2du/contact_matrix | Contact_maps/DeepLearning/DeepLearningTool/DL_contact_matrix_load2-new10fold_10_27_2014_server.py | 1 | 38119 |
# coding: utf-8
# In[3]:
import sys, os
sys.path.append('../../../libs/')
import os.path
import IO_class
from IO_class import FileOperator
from sklearn import cross_validation
import sklearn
import numpy as np
import csv
from dateutil import parser
from datetime import timedelta
from sklearn import svm
import numpy ... | gpl-2.0 |
waterponey/scikit-learn | sklearn/cross_validation.py | 7 | 72106 |
"""
The :mod:`sklearn.cross_validation` module includes utilities for cross-
validation and performance evaluation.
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>,
# Gael Varoquaux <gael.varoquaux@normalesup.org>,
# Olivier Grisel <olivier.grisel@ensta.org>
# License: BSD 3 clause
fro... | bsd-3-clause |
yidawang/brainiak | brainiak/utils/fmrisim.py | 1 | 77745 | # Copyright 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | apache-2.0 |
SriramS32/Transfer-Learning | mlpPreTrain.py | 1 | 34367 | """
The starter MLP code is from http://deeplearning.net/tutorial/mlp.html
@author/editor Sriram Somasundaram
Add outFile in both areas functionality, remove first transfer, have main method call one test method or the other test method, with each one
"""
__docformat__ = 'restructedtext en'
import cPickle
import ... | bsd-3-clause |
astropy/photutils | photutils/datasets/make.py | 2 | 32642 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools for making example datasets for examples and
tests.
"""
from astropy import coordinates as coord
from astropy.convolution import discretize_model
from astropy.io import fits
from astropy.modeling import models
from astropy.t... | bsd-3-clause |
thorwhalen/ut | ml/decomp/sompy.py | 1 | 45652 | """SOM utils"""
# Adapted from:
# Vahid Moosavi 2015 05 12 09:04 pm
# sevamoo@gmail.com
# Chair For Computer Aided Architectural Design, ETH Zurich
# Future Cities Lab
# www.vahidmoosavi.com
import numpy as np
from matplotlib import pyplot as plt
import matplotlib.gridspec as gridspec
import numexpr as ne
from time i... | mit |
cjayb/mne-python | mne/cov.py | 1 | 79004 | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Matti Hämäläinen <msh@nmr.mgh.harvard.edu>
# Denis A. Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
from copy import deepcopy
from distutils.version import LooseVersion
import itertools as itt
from math import log
import ... | bsd-3-clause |
mikelum/pyspeckit | pyspeckit/spectrum/fitters.py | 1 | 88070 | from __future__ import print_function
import matplotlib
import numpy as np
import copy
import re
import itertools
from astropy import log
from astropy import units as u
from astropy.extern.six.moves import xrange
from ..config import mycfg
from ..config import ConfigDescriptor as cfgdec
from . import units
from . impo... | mit |
Eric89GXL/mne-python | mne/viz/misc.py | 3 | 48874 | # -*- coding: utf-8 -*-
"""Functions to make simple plots with M/EEG data."""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
# Cathy Nangini... | bsd-3-clause |
harisbal/pandas | pandas/io/formats/format.py | 3 | 54799 | # -*- coding: utf-8 -*-
"""
Internal module for formatting output data in csv, html,
and latex files. This module also applies to display formatting.
"""
from __future__ import print_function
# pylint: disable=W0141
from functools import partial
import numpy as np
from pandas._libs import lib
from pandas._libs.tsli... | bsd-3-clause |
akionakamura/scikit-learn | sklearn/utils/estimator_checks.py | 2 | 47791 | from __future__ import print_function
import types
import warnings
import sys
import traceback
import inspect
import pickle
from copy import deepcopy
import numpy as np
from scipy import sparse
import struct
from sklearn.externals.six.moves import zip
from sklearn.externals.joblib import hash, Memory
from sklearn.ut... | bsd-3-clause |
bnaul/scikit-learn | sklearn/covariance/_graph_lasso.py | 3 | 33284 | """GraphicalLasso: sparse inverse covariance estimation with an l1-penalized
estimator.
"""
# Author: Gael Varoquaux <gael.varoquaux@normalesup.org>
# License: BSD 3 clause
# Copyright: INRIA
from collections.abc import Sequence
import warnings
import operator
import sys
import time
import numpy as np
from scipy impo... | bsd-3-clause |
plotly/python-api | packages/python/plotly/plotly/graph_objs/_bar.py | 1 | 100695 | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Bar(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "bar"
_valid_props = {
"alignmentgroup",
"base",
"basesrc",
"cliponaxis",
... | mit |
aeklant/scipy | scipy/ndimage/filters.py | 1 | 50379 | # Copyright (C) 2003-2005 Peter J. Verveer
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following d... | bsd-3-clause |
josephcslater/scipy | scipy/cluster/tests/test_hierarchy.py | 14 | 40869 | #
# Author: Damian Eads
# Date: April 17, 2008
#
# Copyright (C) 2008 Damian Eads
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this... | bsd-3-clause |
kylemede/ExoSOFT | ExoSOFT/tools/startupTools.py | 1 | 44980 | #@Author: Kyle Mede, kylemede@astron.s.u-tokyo.ac.jp or kylemede@gmail.com
#import sys
#from IPython.core.prompts import cwd_filt
from __future__ import absolute_import
from __future__ import print_function
import shutil
import os
import copy
import numpy as np
import KMlogger
import warnings
import multiprocessing
#f... | gpl-3.0 |
SBRG/ssbio | ssbio/protein/structure/utils/dock.py | 2 | 40526 | """
DOCK
====
"""
import os
import pandas as pd
import os.path as op
import logging
from ssbio.core.object import Object
import ssbio.utils
log = logging.getLogger(__name__)
class DOCK(Object):
"""Class to prepare a structure file for docking with DOCK6.
Attributes:
"""
def __init__(self, struct... | mit |
Candihub/pixel | apps/explorer/tests/views/test_views_list.py | 1 | 37244 | import datetime
import pandas
from django.core.urlresolvers import reverse
from django.template.defaultfilters import date as date_filter
from django.utils import timezone
from io import BytesIO
from unittest.mock import patch
from zipfile import ZipFile
from apps.core import factories, models
from apps.core.template... | bsd-3-clause |
jjtoharia/Kaggle_Intel-MobileODT-Cervical-Cancer-Screening | jjtz_intel_ann.py | 1 | 53131 | #!/usr/bin/env python3
#Quiero utf8: áéíóú
# NOTA: UNICODE - UTF8 - También! Si no hay acentos, conversiones -> UNICODE/UTF8 a UTF8 (ed. Unicode)
# NOTA: Para borrar todas la variables: %reset
# NOTA: Arrancar desde /home/jjtoharia/ con:
# source kaggle/bin/activate
# [Python] - python -i kaggle/IntelCervicalCan... | mit |
blondegeek/pymatgen | pymatgen/analysis/pourbaix_diagram.py | 3 | 33149 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import logging
import numpy as np
import itertools
import re
from copy import deepcopy
from functools import cmp_to_key, partial, lru_cache
from monty.json import MSONable, MontyDecoder
from multiprocessing i... | mit |
VisTrails/VisTrails | vistrails/packages/matplotlib/parse.py | 2 | 39319 | #!/usr/bin/env python
###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is par... | bsd-3-clause |
lioritan/Thesis | problems/alg10_ohsumed_nontree.py | 1 | 35249 | # -*- coding: utf-8 -*-
"""
Created on Sun Jan 18 16:46:57 2015
@author: liorf
"""
from random import choice
from numpy import *
from matplotlib.mlab import find
from scipy.stats import mode, chisquare
from sklearn.svm import SVC
from sklearn.neighbors import KNeighborsClassifier
import time
def clean_tree... | gpl-2.0 |
xwolf12/scikit-learn | sklearn/metrics/classification.py | 35 | 67275 | """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... | bsd-3-clause |
kedz/cuttsum | wp-scripts/make-wiki-list.py | 1 | 319487 | # coding=utf-8
import urllib3
import pandas as pd
import sys
import json
import gzip
import os
urllib3.disable_warnings()
type2cats = {
u'accident': ['Category:Accidents'],
u'impact event': ['Category:Astronomy'],
u'bombing': ['Category:Terrorism'],
u'hostage': ['Category:Terrorism'],
u'shooting':... | apache-2.0 |
hohlraum/ScatPy | ScatPy/results.py | 1 | 53250 | # -*- coding: utf-8 -*-
"""
For reading, manipulating and plotting the output files from DDSCAT
Results from an individual file (e.g. qtable or shape.dat) are held within a
dictionary-like object. The columns of the table (e.g. wavelength, Q_ext) are
accessible as entires in the dictionary that can be accessed using t... | gpl-3.0 |
Centre-Alt-Rendiment-Esportiu/att | old_project/Python/win_libs/scipy/signal/filter_design.py | 8 | 103735 | """Filter design.
"""
from __future__ import division, print_function, absolute_import
import warnings
import numpy
from numpy import (atleast_1d, poly, polyval, roots, real, asarray, allclose,
resize, pi, absolute, logspace, r_, sqrt, tan, log10,
arctan, arcsinh, sin, exp, cosh,... | gpl-3.0 |
Srisai85/numpy | numpy/linalg/linalg.py | 31 | 75612 | """Lite version of scipy.linalg.
Notes
-----
This module is a lite version of the linalg.py module in SciPy which
contains high-level Python interface to the LAPACK library. The lite
version only accesses the following LAPACK functions: dgesv, zgesv,
dgeev, zgeev, dgesdd, zgesdd, dgelsd, zgelsd, dsyevd, zheevd, dgetr... | bsd-3-clause |
phobson/pygridtools | pygridtools/core.py | 2 | 34073 | from __future__ import division
import warnings
from copy import deepcopy
import numpy
from scipy import interpolate
import pandas
from pygridtools import misc
from pygridtools import iotools
from pygridtools import viz
from pygridtools import validate
from pygridtools.gefdc import GEFDCWriter
def transform(nodes,... | bsd-3-clause |
aabadie/scikit-learn | sklearn/model_selection/_search.py | 2 | 45386 | """
The :mod:`sklearn.model_selection._search` includes utilities to fine-tune the
parameters of an estimator.
"""
from __future__ import print_function
from __future__ import division
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>,
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# Andreas... | bsd-3-clause |
cython-testbed/pandas | pandas/core/groupby/generic.py | 1 | 58320 | """
Define the SeriesGroupBy, DataFrameGroupBy, and PanelGroupBy
classes that hold the groupby interfaces (and some implementations).
These are user facing as the result of the ``df.groupby(...)`` operations,
which here returns a DataFrameGroupBy object.
"""
import collections
import warnings
import copy
from textwra... | bsd-3-clause |
sunzhxjs/JobGIS | lib/python2.7/site-packages/pandas/io/tests/test_stata.py | 9 | 46598 | # -*- coding: utf-8 -*-
# pylint: disable=E1101
from datetime import datetime
import datetime as dt
import os
import warnings
import nose
import struct
import sys
from distutils.version import LooseVersion
import numpy as np
import pandas as pd
from pandas.compat import iterkeys
from pandas.core.frame import DataFra... | mit |
pratapvardhan/scikit-learn | sklearn/linear_model/least_angle.py | 10 | 57263 | """
Least Angle Regression algorithm. See the documentation on the
Generalized Linear Model for a complete discussion.
"""
from __future__ import print_function
# Author: Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Gael Varoquaux
#
# License: BSD 3 ... | bsd-3-clause |
ThomasBrouwer/BNMTF | experiments/experiments_toy/convergence/nmtf_gibbs.py | 1 | 62421 | """
Recover the toy dataset using Gibbs.
We can plot the MSE, R2 and Rp as it converges.
We have I=100, J=80, K=10, and 10% test data.
We give flatter priors (1/10) than what was used to generate the data (1).
"""
import sys, os
project_location = os.path.dirname(__file__)+"/../../../../"
sys.path.append(project_loc... | apache-2.0 |
jonycgn/scipy | scipy/interpolate/fitpack.py | 16 | 46294 | #!/usr/bin/env python
"""
fitpack (dierckx in netlib) --- A Python-C wrapper to FITPACK (by P. Dierckx).
FITPACK is a collection of FORTRAN programs for curve and surface
fitting with splines and tensor product splines.
See
http://www.cs.kuleuven.ac.be/cwis/research/nalag/research/topics/fitpack.html
... | bsd-3-clause |
YihaoLu/statsmodels | statsmodels/tsa/statespace/tests/test_varmax.py | 4 | 30250 | """
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.datasets import webuse
from statsmodels.tsa.statespace import varmax
from .results i... | bsd-3-clause |
yavalvas/yav_com | build/matplotlib/lib/matplotlib/transforms.py | 1 | 90899 | """
matplotlib includes a framework for arbitrary geometric
transformations that is used determine the final position of all
elements drawn on the canvas.
Transforms are composed into trees of :class:`TransformNode` objects
whose actual value depends on their children. When the contents of
children change, their pare... | mit |
jreback/pandas | pandas/tests/test_strings.py | 1 | 134547 | from datetime import datetime, timedelta
import re
import numpy as np
import pytest
from pandas._libs import lib
import pandas as pd
from pandas import DataFrame, Index, MultiIndex, Series, concat, isna, notna
import pandas._testing as tm
import pandas.core.strings as strings
def assert_series_or_index_equal(left,... | bsd-3-clause |
detrout/debian-statsmodels | statsmodels/sandbox/stats/multicomp.py | 26 | 70641 | '''
from pystatsmodels mailinglist 20100524
Notes:
- unfinished, unverified, but most parts seem to work in MonteCarlo
- one example taken from lecture notes looks ok
- needs cases with non-monotonic inequality for test to see difference between
one-step, step-up and step-down procedures
- FDR doesn't look rea... | bsd-3-clause |
amolkahat/pandas | pandas/tests/indexes/common.py | 1 | 43693 | # -*- coding: utf-8 -*-
import pytest
from pandas import compat
from pandas.compat import PY3
import numpy as np
from pandas import (Series, Index, Float64Index, Int64Index, UInt64Index,
RangeIndex, MultiIndex, CategoricalIndex, DatetimeIndex,
TimedeltaIndex, PeriodIndex, Int... | bsd-3-clause |
icexelloss/arrow | python/pyarrow/tests/test_plasma.py | 1 | 37815 | # 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 |
jniediek/mne-python | mne/viz/topomap.py | 3 | 88971 | """Functions to plot M/EEG data e.g. topographies
"""
from __future__ import print_function
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com... | bsd-3-clause |
Ziqi-Li/bknqgis | pandas/pandas/tests/test_window.py | 2 | 154549 | from itertools import product
import pytest
import sys
import warnings
from warnings import catch_warnings
from datetime import datetime, timedelta
from numpy.random import randn
import numpy as np
from distutils.version import LooseVersion
import pandas as pd
from pandas import (Series, DataFrame, bdate_range, isna,... | gpl-2.0 |
alexus37/AugmentedRealityChess | pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/numpy/lib/function_base.py | 30 | 124613 | from __future__ import division, absolute_import, print_function
import warnings
import sys
import collections
import operator
import numpy as np
import numpy.core.numeric as _nx
from numpy.core import linspace, atleast_1d, atleast_2d
from numpy.core.numeric import (
ones, zeros, arange, concatenate, array, asarr... | mit |
lancezlin/ml_template_py | lib/python2.7/site-packages/pandas/tests/test_window.py | 7 | 146653 | from itertools import product
import nose
import sys
import warnings
from nose.tools import assert_raises
from datetime import datetime
from numpy.random import randn
import numpy as np
from distutils.version import LooseVersion
import pandas as pd
from pandas import (Series, DataFrame, Panel, bdate_range, isnull,
... | mit |
sauloal/cnidaria | scripts/venv/lib/python2.7/site-packages/pandas/tseries/tests/test_timedeltas.py | 1 | 57424 | # pylint: disable-msg=E1101,W0612
from __future__ import division
from datetime import datetime, timedelta, time
import nose
from distutils.version import LooseVersion
import numpy as np
import pandas as pd
from pandas import (Index, Series, DataFrame, Timestamp, Timedelta, TimedeltaIndex, isnull, notnull,
... | mit |
svn2github/vbox | src/VBox/ValidationKit/testmanager/webui/wuigraphwiz.py | 4 | 32240 | # -*- coding: utf-8 -*-
# $Id$
"""
Test Manager WUI - Graph Wizard
"""
__copyright__ = \
"""
Copyright (C) 2012-2014 Oracle Corporation
This file is part of VirtualBox Open Source Edition (OSE), as
available from http://www.virtualbox.org. This file is free software;
you can redistribute it and/or modify it under th... | gpl-2.0 |
maropu/spark | python/pyspark/pandas/spark/accessors.py | 2 | 42892 | #
# 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 |
HRZaheri/sklearn-theano | doc/sphinxext/gen_rst.py | 11 | 38957 | """
Example generation for the scikit learn
Generate the rst files for the examples by iterating over the python
example files.
Files that generate images should start with 'plot'
"""
from __future__ import division, print_function
from time import time
import ast
import os
import re
import shutil
import traceback
i... | bsd-3-clause |
loli/sklearn-ensembletrees | sklearn/tests/test_common.py | 1 | 43988 | """
General tests for all estimators in sklearn.
"""
# Authors: Andreas Mueller <amueller@ais.uni-bonn.de>
# Gael Varoquaux gael.varoquaux@normalesup.org
# License: BSD 3 clause
from __future__ import print_function
import os
import warnings
import sys
import traceback
import inspect
import pickle
import pkg... | bsd-3-clause |
f3r/scikit-learn | sklearn/svm/tests/test_svm.py | 18 | 31449 | """
Testing for Support Vector Machine module (sklearn.svm)
TODO: remove hard coded numerical results when possible
"""
import numpy as np
import itertools
from numpy.testing import assert_array_equal, assert_array_almost_equal
from numpy.testing import assert_almost_equal
from scipy import sparse
from nose.tools im... | bsd-3-clause |
etkirsch/scikit-learn | sklearn/tree/tree.py | 59 | 34839 | """
This module gathers tree-based methods, including decision, regression and
randomized trees. Single and multi-output problems are both handled.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Brian Holt <bdholt1@gmail.com>
# Noel Da... | bsd-3-clause |
clemkoa/scikit-learn | sklearn/datasets/base.py | 13 | 30226 | """
Base IO code for all datasets
"""
# Copyright (c) 2007 David Cournapeau <cournape@gmail.com>
# 2010 Fabian Pedregosa <fabian.pedregosa@inria.fr>
# 2010 Olivier Grisel <olivier.grisel@ensta.org>
# License: BSD 3 clause
from __future__ import print_function
import os
import csv
import sy... | bsd-3-clause |
louispotok/pandas | pandas/tests/indexes/interval/test_interval.py | 1 | 40217 | from __future__ import division
import pytest
import numpy as np
from pandas import (
Interval, IntervalIndex, Index, isna, notna, interval_range, Timestamp,
Timedelta, date_range, timedelta_range)
from pandas.compat import lzip
import pandas.core.common as com
from pandas.tests.indexes.common import Base
impo... | bsd-3-clause |
huggingface/transformers | src/transformers/models/tapas/modeling_tapas.py | 1 | 106842 | # coding=utf-8
# Copyright 2020 Google Research and The HuggingFace Inc. team.
#
# 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 re... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.