repo_name
string
path
string
copies
string
size
string
content
string
license
string
IshankGulati/scikit-learn
sklearn/feature_extraction/text.py
19
52042
# -*- coding: utf-8 -*- # Authors: Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Lars Buitinck # Robert Layton <robertlayton@gmail.com> # Jochen Wersdörfer <jochen@wersdoerfer.de> # Roman Sinayev <roman.sinayev@gmail.com> # # License: B...
bsd-3-clause
cython-testbed/pandas
pandas/io/json/json.py
3
33520
# pylint: disable-msg=E1101,W0613,W0603 from itertools import islice import os import numpy as np import pandas._libs.json as json from pandas._libs.tslibs import iNaT from pandas.compat import StringIO, long, u, to_str from pandas import compat, isna from pandas import Series, DataFrame, to_datetime, MultiIndex from ...
bsd-3-clause
endolith/scipy
scipy/stats/_multivariate.py
5
153946
# # Author: Joris Vankerschaver 2013 # import math import numpy as np from numpy import asarray_chkfinite, asarray import scipy.linalg from scipy._lib import doccer from scipy.special import gammaln, psi, multigammaln, xlogy, entr, betaln from scipy._lib._util import check_random_state from scipy.linalg.blas import dro...
bsd-3-clause
energyPATHWAYS/energyPATHWAYS
model_building_tools/scenario_builder/scenario_builder.py
1
60144
# -*- coding: utf-8 -*- # WARNING: If you try to import something that isn't in your python path, # xlwings will fail silently when called from Excel (at least on Excel 2016 for Mac)! import os import subprocess import traceback import json import string from datetime import datetime import platform import xlwings as ...
mit
sem-geologist/hyperspy
hyperspy/_signals/lazy.py
3
36898
# -*- 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
YinongLong/scikit-learn
sklearn/metrics/classification.py
1
71650
"""Metrics to assess performance on classification task given class 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.gramf...
bsd-3-clause
clarkfitzg/xray
xray/test/test_variable.py
2
35943
from collections import namedtuple from copy import copy, deepcopy from datetime import datetime, timedelta from textwrap import dedent from distutils.version import LooseVersion import numpy as np import pandas as pd from xray import Variable, Dataset, DataArray from xray.core import indexing from xray.core.variable...
apache-2.0
LiaoPan/scikit-learn
sklearn/decomposition/dict_learning.py
83
44062
""" Dictionary learning """ from __future__ import print_function # Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort # License: BSD 3 clause import time import sys import itertools from math import sqrt, ceil import numpy as np from scipy import linalg from numpy.lib.stride_tricks import as_strided from ..b...
bsd-3-clause
rgommers/scipy
scipy/signal/filter_design.py
7
179656
"""Filter design.""" import math import operator import warnings import numpy import numpy as np from numpy import (atleast_1d, poly, polyval, roots, real, asarray, resize, pi, absolute, logspace, r_, sqrt, tan, log10, arctan, arcsinh, sin, exp, cosh, arccosh, ceil, conjugate, ...
bsd-3-clause
SiLab-Bonn/testbeam_analysis
testbeam_analysis/result_analysis.py
1
88746
''' 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
CalebBell/ht
tests/test_conv_tube_bank.py
1
66185
# -*- coding: utf-8 -*- '''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, 2017 Caleb Bell <Caleb.Andrew.Bell@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to...
mit
Windy-Ground/scikit-learn
sklearn/linear_model/tests/test_logistic.py
59
35368
import numpy as np import scipy.sparse as sp from scipy import linalg, optimize, sparse import scipy from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_equal from...
bsd-3-clause
karllessard/tensorflow
tensorflow/python/keras/engine/data_adapter_test.py
2
43498
# Copyright 2019 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
anntzer/scikit-learn
sklearn/model_selection/_search_successive_halving.py
3
40300
from math import ceil, floor, log from abc import abstractmethod from numbers import Integral import numpy as np from ._search import _check_param_grid from ._search import BaseSearchCV from . import ParameterGrid, ParameterSampler from ..utils.validation import _num_samples from ..base import is_classifier from ._spl...
bsd-3-clause
Juanlu001/xlwings
xlwings/main.py
1
67142
""" xlwings - Make Excel fly with Python! Homepage and documentation: http://xlwings.org See also: http://zoomeranalytics.com Copyright (C) 2014-2016, Zoomer Analytics LLC. All rights reserved. License: BSD 3-clause (see LICENSE.txt for details) """ import os import sys import re import numbers import itertools impo...
apache-2.0
tturowski/gwide
gwide/Classes/tRNAFromConcatv2.py
1
65364
#!/usr/bin/env python import numpy as np import sys, collections, re from pypeaks import Data from pyCRAC.Parsers import GTF2 import matplotlib.pyplot as plt import pandas as pd # import seaborn class tRNAFromConcatv2(): def __init__(self, gtf_file, five_prime_flank, three_prime_flank, hits_threshold, lookahead, ...
apache-2.0
elkingtonmcb/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/colors.py
69
31676
""" A module for converting numbers or color arguments to *RGB* or *RGBA* *RGB* and *RGBA* are sequences of, respectively, 3 or 4 floats in the range 0-1. This module includes functions and classes for color specification conversions, and for mapping numbers to colors in a 1-D array of colors called a colormap. Color...
agpl-3.0
sem-geologist/hyperspy
hyperspy/roi.py
2
47245
# -*- 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 y...
gpl-3.0
lthurlow/Network-Grapher
proj/external/matplotlib-1.2.1/build/lib.linux-i686-2.7/matplotlib/axes.py
2
324939
from __future__ import division, print_function import math, sys, warnings, datetime from operator import itemgetter import itertools import numpy as np from numpy import ma import matplotlib rcParams = matplotlib.rcParams import matplotlib.artist as martist from matplotlib.artist import allow_rasterization import m...
mit
wwf5067/statsmodels
statsmodels/iolib/summary.py
8
34185
from statsmodels.compat.python import range, lrange, lmap, lzip, zip_longest import numpy as np from statsmodels.iolib.table import SimpleTable from statsmodels.iolib.tableformatting import (gen_fmt, fmt_2, fmt_params, fmt_base, fmt_2cols) #from statsmodels.iolib.summary2...
bsd-3-clause
jgbarah/revisor
report.py
1
45149
#! /usr/bin/python # -*- coding: utf-8 -*- ## Copyright (C) 2014 Bitergia ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 3 of the License, or ## (at your option) any later...
gpl-3.0
mortonjt/scipy
scipy/cluster/tests/test_hierarchy.py
26
35159
#! /usr/bin/env python # # 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 copy...
bsd-3-clause
albertoferna/compmech
compmech/conecyl/conecyl.py
1
87599
from __future__ import division import gc import os import sys import traceback from collections import Iterable import time import cPickle import __main__ import numpy as np from scipy.sparse import coo_matrix, csr_matrix, csc_matrix from scipy.sparse.linalg import eigsh from scipy.optimize import leastsq from numpy ...
bsd-3-clause
paladin74/neural-network-animation
matplotlib/path.py
10
36297
""" A module for dealing with the polylines used throughout matplotlib. The primary class for polyline handling in matplotlib is :class:`Path`. Almost all vector drawing makes use of Paths somewhere in the drawing pipeline. Whilst a :class:`Path` instance itself cannot be drawn, there exists :class:`~matplotlib.artis...
mit
larsoner/mne-python
mne/decoding/csp.py
3
34992
# -*- coding: utf-8 -*- # Authors: Romain Trachel <trachelr@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Alexandre Barachant <alexandre.barachant@gmail.com> # Clemens Brunner <clemens.brunner@gmail.com> # Jean-Remi King <jeanremi.king@gmail.com> # # License: BSD (3...
bsd-3-clause
Erotemic/ubelt
ubelt/util_format.py
1
40528
# -*- coding: utf-8 -*- """ Defines the function :func:`repr2`, which allows for a bit more customization than :func:`repr` or :func:`pprint`. See the docstring for more details. Two main goals of repr2 are to provide nice string representations of nested data structures and make those "eval-able" whenever possible. ...
apache-2.0
followyourheart/SFrame
oss_src/unity/python/sframe/test/test_sarray.py
8
67699
# -*- coding: utf-8 -*- ''' Copyright (C) 2015 Dato, Inc. All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' from ..data_structures.sarray import SArray from ..util.timezone import GMT import pandas as pd import numpy as np impo...
bsd-3-clause
wlamond/scikit-learn
sklearn/model_selection/tests/test_validation.py
7
42247
"""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
clemkoa/scikit-learn
sklearn/ensemble/forest.py
1
78779
"""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
shishaochen/TensorFlow-0.8-Win
tensorflow/contrib/learn/python/learn/estimators/base.py
1
40162
"""Base estimator class.""" # Copyright 2015-present The Scikit Flow 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/LIC...
apache-2.0
evodify/genomic-analyses_in_apache-spark
vcf_filtering_tutorial/Genomics&Spark.py
1
31681
# Databricks notebook source # MAGIC %md # Processing genomic data in Spark # MAGIC # MAGIC *You can import this notebook from [here](https://github.com/evodify/genomic-analyses_in_apache-spark/tree/master/vcf_filtering_tutorial).* # MAGIC # MAGIC ## [Big Data: Astronomical or Genomical?](http://journals.plos.org/plo...
mit
cloudera/hue
desktop/core/ext-py/openpyxl-2.6.4/openpyxl/styles/builtins.py
2
31221
from __future__ import absolute_import # Copyright (c) 2010-2019 openpyxl # Builtins styles as defined in Part 4 Annex G.2 from .named_styles import NamedStyle from openpyxl.xml.functions import fromstring normal = """ <namedStyle builtinId="0" name="Normal"> <alignment/> <border> <left/> <rig...
apache-2.0
admed/molgears
widgets/read_result.py
1
56114
# -*- coding: utf-8 -*- import xlrd from datetime import datetime from numpy import array from math import log10 def read_fullplate(filepath, concs): from math import fabs workbook = xlrd.open_workbook(filepath) worksheet = workbook.sheet_by_index(0) date_cell = worksheet.cell_value(28, 1) if date_...
bsd-3-clause
mehdidc/scikit-learn
sklearn/utils/estimator_checks.py
1
40346
from __future__ import print_function 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 from sklearn.utils.testing import as...
bsd-3-clause
HBNLdev/DataStore
db/file_handling.py
1
51898
'''Handling HBNL files ''' import os import shutil import subprocess from collections import OrderedDict from datetime import datetime import h5py import numpy as np import pandas as pd import db.database as D from .utils.compilation import join_allcols, extract_session_fromuID, join_ufields, column_split from .util...
gpl-3.0
mikebenfield/scikit-learn
sklearn/metrics/pairwise.py
28
46720
# -*- coding: utf-8 -*- # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Robert Layton <robertlayton@gmail.com> # Andreas Mueller <amueller@ais.uni-bonn.de> # Philippe Gervais <philippe.gervais@inria.fr> # Lars Buitinck ...
bsd-3-clause
eggimasv/EcoDen
Python_Files/functions_EcoDen.py
1
101952
# ====================================================================================== # Copyright 2016 Swiss Federal Institute of Aquatic Science and Technology # # 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 ...
lgpl-3.0
sergiopasra/numina
numina/array/display/ximshow.py
3
34038
# # Copyright 2015-2021 Universidad Complutense de Madrid # # This file is part of Numina # # SPDX-License-Identifier: GPL-3.0+ # License-Filename: LICENSE.txt # import argparse from astropy.io import fits import numpy as np import re from .matplotlib_qt import set_window_geometry from .pause_debugplot import pause_d...
gpl-3.0
nelango/ViralityAnalysis
model/lib/nltk/parse/transitionparser.py
3
31227
# Natural Language Toolkit: Arc-Standard and Arc-eager Transition Based Parsers # # Author: Long Duong <longdt219@gmail.com> # # Copyright (C) 2001-2015 NLTK Project # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import absolute_import from __future__ import division from __future...
mit
marius311/cosmoslik
cosmoslik/chains.py
1
36828
""" Python module for dealing with MCMC chains. Contains utilities to: * Load chains in a variety of formats * Compute statistics (mean, std-dev, conf intervals, ...) * Plot 1- and 2-d distributions of one or multiple parameters. * Post-process chains """ import os, sys, re from numpy import * from numpy.linalg ...
gpl-3.0
theoryno3/scikit-learn
sklearn/preprocessing/tests/test_data.py
3
35967
import warnings import numpy as np import numpy.linalg as la from scipy import sparse from distutils.version import LooseVersion from sklearn.utils.testing import assert_almost_equal, clean_warning_registry from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_array_equal...
bsd-3-clause
yejingxin/PyKrige
pykrige/ok3d.py
1
33404
__doc__ = """Code by Benjamin S. Murphy bscott.murphy@gmail.com Dependencies: numpy scipy matplotlib Classes: OrdinaryKriging3D: Support for 3D Ordinary Kriging. References: P.K. Kitanidis, Introduction to Geostatistcs: Applications in Hydrogeology, (Cambridge University Press, 1997) 272 p. ...
bsd-3-clause
lizardsystem/lizard-measure
lizard_measure/views.py
1
36112
# (c) Nelen & Schuurmans. GPL licensed, see LICENSE.txt. import json import logging import datetime import math import iso8601 from django.db.models.query_utils import Q from django.shortcuts import get_object_or_404 from django.shortcuts import render_to_response from django.template import RequestContext from dj...
gpl-3.0
kvasukib/groupflow_simulator
groupflow_scripts/tree_aggregation_simulations/tree_aggregation_bidirectional.py
2
31709
from scipy.stats import truncnorm, tstd, poisson, expon from numpy.random import randint, uniform from datetime import datetime from collections import defaultdict from sets import Set from heapq import heappop, heappush from time import time from scipy.cluster.hierarchy import * from scipy.spatial.distance import pdi...
apache-2.0
shujaatak/UAV_MissionPlanner
Lib/site-packages/numpy/lib/npyio.py
53
59490
__all__ = ['savetxt', 'loadtxt', 'genfromtxt', 'ndfromtxt', 'mafromtxt', 'recfromtxt', 'recfromcsv', 'load', 'loads', 'save', 'savez', 'savez_compressed', 'packbits', 'unpackbits', 'fromregex', 'DataSource'] import numpy as np import format import sys import os import sys import itertools import ...
gpl-2.0
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/scipy/optimize/_lsq/least_squares.py
27
37725
"""Generic interface for least-square minimization.""" from __future__ import division, print_function, absolute_import from warnings import warn import numpy as np from numpy.linalg import norm from scipy.sparse import issparse, csr_matrix from scipy.sparse.linalg import LinearOperator from scipy.optimize import _m...
mit
YihaoLu/statsmodels
statsmodels/emplike/descriptive.py
19
38795
""" Empirical likelihood inference on descriptive statistics This module conducts hypothesis tests and constructs confidence intervals for the mean, variance, skewness, kurtosis and correlation. If matplotlib is installed, this module can also generate multivariate confidence region plots as well as mean-variance con...
bsd-3-clause
blueburningcoder/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/backend_bases.py
69
69740
""" Abstract base classes define the primitives that renderers and graphics contexts must implement to serve as a matplotlib backend :class:`RendererBase` An abstract base class to handle drawing/rendering operations. :class:`FigureCanvasBase` The abstraction layer that separates the :class:`matplotlib.fi...
agpl-3.0
ARudiuk/mne-python
mne/viz/evoked.py
1
48115
"""Functions to make simple plot on evoked M/EEG data (besides 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 Lars...
bsd-3-clause
fitermay/intellij-community
python/helpers/pydev/pydevd.py
3
63162
''' Entry point module (keep at root): This module starts the debugger. ''' from __future__ import nested_scopes # Jython 2.1 support import atexit import os import sys import traceback from _pydevd_bundle.pydevd_constants import IS_JYTH_LESS25, IS_PY3K, IS_PY34_OLDER, get_thread_id, dict_keys, dict_pop, dict_conta...
apache-2.0
JohannesBuchner/PLUTO
Tools/pyPLUTO/bin/GUI_pyPLUTO.py
3
36620
#!/usr/bin/env python import matplotlib matplotlib.use('TkAgg') from numpy import arange, sin, pi,log10,max,min,cos,isnan, meshgrid,sqrt,abs from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg,NavigationToolbar2TkAgg from matplotlib.figure import Figure import pyPLUTO as pp import string import time fro...
gpl-2.0
LukeC92/iris
lib/iris/tests/__init__.py
2
45559
# (C) British Crown Copyright 2010 - 2017, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
lgpl-3.0
mnori/foldatlas
foldatlas/importers.py
1
44199
import settings import models from models import Strain, Gene, Transcript, Feature, \ GeneLocation, NucleotideMeasurementRun, StructurePredictionRun, NucleotideMeasurementSet, \ Structure, RawReactivities, RawReplicateCounts, values_str_unpack_float, Bppm from utils import Timeline from database import engine,...
mit
jjhelmus/scipy
scipy/optimize/nonlin.py
11
46689
r""" Nonlinear solvers ----------------- .. currentmodule:: scipy.optimize This is a collection of general-purpose nonlinear multidimensional solvers. These solvers find *x* for which *F(x) = 0*. Both *x* and *F* can be multidimensional. Routines ~~~~~~~~ Large-scale nonlinear solvers: .. autosummary:: newto...
bsd-3-clause
vortex-ape/scikit-learn
sklearn/linear_model/stochastic_gradient.py
2
64475
# 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 warnings from abc import ABCMeta, abstractmethod from ..utils im...
bsd-3-clause
mjudsp/Tsallis
sklearn/ensemble/forest.py
1
64666
"""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
McDermott-Group/LabRAD
LabRAD/TestScripts/fpgaTest/pyle/build/lib/pyle/dataking/automateDaily.py
2
41937
from datetime import datetime import itertools import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np from scipy.optimize import leastsq, fsolve import time import random import labrad from labrad.units import Unit ns, us, GHz, MHz = [Unit(s) for s in ('ns', 'us', 'GHz', 'MHz')] f...
gpl-2.0
person142/scipy
scipy/spatial/kdtree.py
4
38301
# Copyright Anne M. Archibald 2008 # Released under the scipy license import numpy as np from heapq import heappush, heappop import scipy.sparse __all__ = ['minkowski_distance_p', 'minkowski_distance', 'distance_matrix', 'Rectangle', 'KDTree'] def minkowski_distance_p(x, y, p=2): """ Co...
bsd-3-clause
ElDeveloper/scikit-learn
sklearn/ensemble/tests/test_forest.py
3
41612
""" Testing for the forest module (sklearn.ensemble.forest). """ # Authors: Gilles Louppe, # Brian Holt, # Andreas Mueller, # Arnaud Joly # License: BSD 3 clause import pickle from collections import defaultdict from itertools import combinations from itertools import product import numpy ...
bsd-3-clause
pratapvardhan/pandas
pandas/tests/reshape/test_pivot.py
2
81063
# -*- 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
joshloyal/scikit-learn
sklearn/linear_model/tests/test_logistic.py
18
41552
import numpy as np import scipy.sparse as sp from scipy import linalg, optimize, sparse from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_equal from sklearn.util...
bsd-3-clause
timbalam/GroopM
groopm/plot.py
1
51299
#!/usr/bin/env python ############################################################################### # # # plot.py # # ...
gpl-3.0
aslihandincer/ibis
docs/sphinxext/ipython_sphinxext/ipython_directive.py
9
37645
# -*- coding: utf-8 -*- """ Sphinx directive to support embedded IPython code. This directive allows pasting of entire interactive IPython sessions, prompts and all, and their code will actually get re-executed at doc build time, with all prompts renumbered sequentially. It also allows you to input code as a pure pyth...
apache-2.0
kanchenxi04/vnpy-app
vn.trader/ctaAlgo/strategy_TripleMa_v0.3.py
1
32295
# encoding: UTF-8 # 首先写系统内置模块 from datetime import datetime, timedelta, date from time import sleep # 其次,导入vnpy的基础模块 import sys sys.path.append('C:\\vnpy-master\\vnpy-master\\vn.trader') from vtConstant import EMPTY_STRING, EMPTY_INT, DIRECTION_LONG, DIRECTION_SHORT, OFFSET_OPEN, STATUS_CANCELLED, EMPTY_FLOA...
mit
bobbymckinney/seebeck_measurement
old versions/Seebeck_HighTemp_CMDLine.py
1
34381
#! /usr/bin/python # -*- coding: utf-8 -*- """ Created: 2016-02-09 @author: Bobby McKinney (bobbymckinney@gmail.com) """ import os import numpy as np import matplotlib.pyplot as plt import minimalmodbus as modbus # For communicating with the cn7500s import omegacn7500 # Driver for cn7500s under minimalmodbus, adds a fe...
gpl-3.0
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/pandas/core/resample.py
3
44151
from datetime import timedelta import numpy as np import warnings import copy from textwrap import dedent import pandas as pd from pandas.core.base import AbstractMethodError, GroupByMixin from pandas.core.groupby import (BinGrouper, Grouper, _GroupBy, GroupBy, SeriesGroupBy, groupby,...
mit
blockstack/pybitcoin
pybitcoin/passphrases/english_words.py
2
753213
# -*- coding: utf-8 -*- """ pybitcoin ~~~~~ :copyright: (c) 2014 by Halfmoon Labs :license: MIT, see LICENSE for more details. """ # 2048 words english_words_bip39 = 'abandon,ability,able,about,above,absent,absorb,abstract,absurd,abuse,access,accident,account,accuse,achieve,acid,acoustic,acquire,acros...
mit
nmayorov/scikit-learn
sklearn/gaussian_process/kernels.py
18
66251
"""Kernels for Gaussian process regression and classification. The kernels in this module allow kernel-engineering, i.e., they can be combined via the "+" and "*" operators or be exponentiated with a scalar via "**". These sum and product expressions can also contain scalar values, which are automatically converted to...
bsd-3-clause
chenhh/PySPPortfolio
PySPPortfolio/pysp_portfolio/exp_cvar.py
1
38832
# -*- coding: utf-8 -*- """ Authors: Hung-Hsin Chen <chenhh@par.cse.nsysu.edu.tw> License: GPL v2 """ import os from time import time import numpy as np import pandas as pd from PySPPortfolio.pysp_portfolio import * from min_cvar_sp import (MinCVaRSPPortfolio, MinCVaRSPPortfolio2 ) from min_cvar_sip import (MinCVaRSIP...
gpl-3.0
robk5uj/invenio
modules/webstat/lib/webstat_engine.py
3
92963
## This file is part of Invenio. ## Copyright (C) 2007, 2008, 2010, 2011 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) any later ...
gpl-2.0
mavenlin/tensorflow
tensorflow/contrib/learn/python/learn/learn_io/data_feeder.py
88
31139
# 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
astocko/statsmodels
statsmodels/genmod/tests/test_glm.py
6
37718
""" Test functions for models.GLM """ 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 import statsmodels.api as sm from st...
bsd-3-clause
dato-code/SFrame
oss_src/unity/python/sframe/test/test_sframe.py
5
134915
''' Copyright (C) 2016 Turi All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' # from nose import with_setup from ..data_structures.sframe import SFrame from ..data_structures.sarray import SArray from ..data_structures.image imp...
bsd-3-clause
sunshinelover/chanlun
vn.trader/ctaAlgo/ctaBacktesting.py
1
34592
# 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 ctaBase import * from ctaSetting import * from vtConstant import * from vtGa...
mit
bchareyre/trial
py/plot.py
5
34986
# encoding: utf-8 # 2008 © Václav Šmilauer <eudoxos@arcig.cz> """ Module containing utility functions for plotting inside yade. See :ysrc:`examples/simple-scene/simple-scene-plot.py` or :ysrc:`examples/concrete/uniax.py` for example of usage. """ ## all exported names __all__=['data','plots','labels','live','liveInt...
gpl-2.0
Djabbz/scikit-learn
sklearn/datasets/samples_generator.py
103
56423
""" Generate samples of synthetic data sets. """ # Authors: B. Thirion, G. Varoquaux, A. Gramfort, V. Michel, O. Grisel, # G. Louppe, J. Nothman # License: BSD 3 clause import numbers import array import numpy as np from scipy import linalg import scipy.sparse as sp from ..preprocessing import MultiLabelBin...
bsd-3-clause
mbayon/TFG-MachineLearning
vbig/lib/python2.7/site-packages/scipy/interpolate/_fitpack_impl.py
10
46541
""" 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 or http://www.netlib....
mit
dice-project/DICE-Monitoring
src/pyUtil.py
4
32334
''' Copyright 2015, Institute e-Austria, Timisoara, Romania http://www.ieat.ro/ Developers: * Gabriel Iuhasz, iuhasz.gabriel@info.uvt.ro 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: ht...
apache-2.0
mdeff/ntds_2016
project/reports/compressed_sensing/utils.py
1
44865
import scipy.misc import os import shutil import zipfile import numpy as np from itertools import product import pywt import matplotlib.pyplot as plt import mpl_toolkits.axes_grid1 import warnings import tensorflow as tf def is_array_str(obj): """ Check if obj is a list of strings or a tuple of strings or a se...
mit
dshean/pygeotools
pygeotools/lib/geolib.py
1
85261
#! /usr/bin/env python """ Geospatial functions for rasters, vectors. """ #Need to make sure all geom have spatial reference included import sys import os import requests import numpy as np from osgeo import gdal, ogr, osr #Enable GDAL exceptions gdal.UseExceptions() #Below are many spatial reference system defin...
mit
rs2/pandas
pandas/plotting/_matplotlib/core.py
1
52089
from typing import TYPE_CHECKING, List, Optional, Tuple import warnings from matplotlib.artist import Artist import numpy as np from pandas._typing import Label from pandas.errors import AbstractMethodError from pandas.util._decorators import cache_readonly from pandas.core.dtypes.common import ( is_float, i...
bsd-3-clause
nan86150/ImageFusion
lib/python2.7/site-packages/numpy/core/tests/test_multiarray.py
23
175667
from __future__ import division, absolute_import, print_function import tempfile import sys import os import shutil import warnings import operator import io if sys.version_info[0] >= 3: import builtins else: import __builtin__ as builtins from decimal import Decimal import numpy as np from nose import SkipT...
mit
chinageology/GeoPython
geopytool/__init__.py
1
71038
#!/usr/bin/python3 # coding:utf-8 from geopytool.ImportDependence import * from geopytool.CustomClass import * LocationOfMySelf=os.path.dirname(__file__) #print(LocationOfMySelf,' init') sign = ''' created on Sat Dec 17 22:28:24 2016 @author: cycleuser # Create Date: 2015-07-13 # Modify Date: 2018-02-09 a tool se...
gpl-3.0
sstoma/CellProfiler
cellprofiler/modules/trackobjects.py
1
137657
from cellprofiler.gui.help import USING_METADATA_HELP_REF, USING_METADATA_GROUPING_HELP_REF, LOADING_IMAGE_SEQ_HELP_REF TM_OVERLAP = 'Overlap' TM_DISTANCE = 'Distance' TM_MEASUREMENTS = 'Measurements' TM_LAP = "LAP" TM_ALL = [TM_OVERLAP, TM_DISTANCE, TM_MEASUREMENTS,TM_LAP] LT_NONE = 0 LT_PHASE_1 = 1 LT_SPLIT = 2 LT_...
gpl-2.0
letsgoexploring/linearsolve-package
linearsolve/__init__.py
1
32412
from __future__ import division,print_function import numpy as np import scipy.linalg as la from statsmodels.tools.numdiff import approx_fprime_cs from scipy.optimize import root,fsolve,broyden1,broyden2 import pandas as pd import sys class model: '''Defines a class -- linearsolve.model -- with associated methods...
mit
procoder317/scikit-learn
sklearn/linear_model/logistic.py
57
65098
""" 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
plotly/plotly.py
packages/python/plotly/plotly/graph_objs/choroplethmapbox/_colorbar.py
1
73541
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "choroplethmapbox" _path_str = "choroplethmapbox.colorbar" _valid_props = { "bgcolo...
mit
openfisca/openfisca-qt
openfisca_qt/openFisca.py
1
63097
# -*- coding:utf-8 -*- # # This file is part of OpenFisca. # OpenFisca is a socio-fiscal microsimulation software # Copyright © 2011 Clément Schaff, Mahdi Ben Jelloul # Licensed under the terms of the GVPLv3 or later license # (see openfisca/__init__.py for details) # This file is inspired by Spyder, see openfisca/spy...
agpl-3.0
briandrawert/GillesPy
gillespy/gillespy.py
2
52338
""" A simple toolkit for creating and simulating discrete stochastic models in python. This serves primarily as a python wrapper for the C-based solvers within StochKit2. The gillespy.Model class provides nearly all of the functionality present in this project. This version is updated (4/2017) to contain documentat...
gpl-3.0
jswanljung/iris
lib/iris/tests/__init__.py
1
39426
# (C) British Crown Copyright 2010 - 2016, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
lgpl-3.0
msotov/SPECIES
Atmos.py
1
54873
from __future__ import division from builtins import range import os import math import re from dataclasses import dataclass from past.utils import old_div import numpy as np from astropy.stats import sigma_clip from astropy.io import ascii from scipy.stats import sigmaclip, linregress import scipy.odr as ODR #from int...
mit
jpautom/scikit-learn
sklearn/tests/test_cross_validation.py
20
46586
"""Test the cross_validation module""" from __future__ import division import warnings import numpy as np from scipy.sparse import coo_matrix from scipy.sparse import csr_matrix from scipy import stats from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_false from sklearn.utils.test...
bsd-3-clause
arhik/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/dates.py
15
33969
""" Matplotlib provides sophisticated date plotting capabilities, standing on the shoulders of python :mod:`datetime`, the add-on modules :mod:`pytz` and :mod:`dateutils`. :class:`datetime` objects are converted to floating point numbers which represent the number of days since 0001-01-01 UTC. The helper functions :f...
agpl-3.0
lesserwhirls/scipy-cwt
scipy/optimize/nonlin.py
2
45860
r""" Nonlinear solvers ================= .. currentmodule:: scipy.optimize This is a collection of general-purpose nonlinear multidimensional solvers. These solvers find *x* for which *F(x) = 0*. Both *x* and *F* can be multidimensional. Routines -------- Large-scale nonlinear solvers: .. autosummary:: newton...
bsd-3-clause
bigdataelephants/scikit-learn
sklearn/linear_model/least_angle.py
6
48722
""" 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
simongibbons/numpy
numpy/lib/npyio.py
3
87121
import sys import os import re import functools import itertools import warnings import weakref import contextlib from operator import itemgetter, index as opindex from collections.abc import Mapping import numpy as np from . import format from ._datasource import DataSource from numpy.core import overrides from numpy...
bsd-3-clause
loli/sklearn-ensembletrees
sklearn/linear_model/stochastic_gradient.py
2
42996
# 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
yufengg/tensorflow
tensorflow/contrib/learn/python/learn/estimators/estimator.py
9
55718
# 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
tetherless-world/satoru
whyis/interpreter.py
2
57286
import rdflib from datetime import datetime from nanopub import Nanopublication import logging import sys import pandas as pd import configparser import hashlib from .autonomic.update_change_service import UpdateChangeService from whyis.namespace import whyis, prov, sio class Interpreter(UpdateChangeService): k...
apache-2.0
apbard/scipy
scipy/stats/_distn_infrastructure.py
6
119658
# # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from __future__ import division, print_function, absolute_import from scipy._lib.six import string_types, exec_, PY3 from scipy._lib._util import getargspec_no_self as _getargspec import sys import keyword import r...
bsd-3-clause