repo_name
string
path
string
copies
string
size
string
content
string
license
string
psarka/uplift
uplift/tree/tree.py
1
37084
# Authors: Paulius Sarka <paulius.sarka@gmail.com> # # Based on sklearn/tree/tree.py (BSD 3 clause) # # Licence: BSD 3 clause from abc import ABC from abc import abstractmethod from math import ceil import numbers import numpy as np from scipy.sparse import issparse from ..base import BaseEstimator from ..base import...
bsd-3-clause
hlin117/scikit-learn
sklearn/metrics/classification.py
1
72721
"""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
pmorissette/ffn
ffn/core.py
1
79128
from __future__ import print_function import random import numpy as np import pandas as pd import scipy.stats import sklearn.cluster import sklearn.covariance import sklearn.manifold from future.utils import iteritems, listvalues from pandas.core.base import PandasObject from scipy.optimize import minimize from scipy...
mit
jseabold/statsmodels
statsmodels/tsa/statespace/tools.py
4
66017
""" Statespace Tools Author: Chad Fulton License: Simplified-BSD """ import numpy as np from scipy.linalg import solve_sylvester import pandas as pd from statsmodels.compat.pandas import Appender from statsmodels.tools.data import _is_using_pandas from scipy.linalg.blas import find_best_blas_type from . import (_init...
bsd-3-clause
phageghost/pg_tools
pgtools/pileups.py
1
198251
import sys #sys.path.append('/home/dskola/workspace/expression_modeling/') import matplotlib #matplotlib.use('Agg') import collections import contextlib import csv import datetime import math import multiprocessing import os import re import shutil import subprocess import gzip import numpy import scipy.ndimage import ...
mit
duncanwp/iris
lib/iris/plot.py
1
45798
# (C) British Crown Copyright 2010 - 2018, 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
saullocastro/pyNastran
pyNastran/f06/parse_flutter.py
1
33532
""" SOL 145 plotter """ from __future__ import print_function from itertools import count from six import iteritems import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from pyNastran.utils.atmosphere import get_alt_for_density from pyNastran.utils.log import get_logger2 from pyNa...
lgpl-3.0
nyusngroup/pyMCZ
pyMCZ/mcz.py
1
32504
#!/usr/bin/env python from __future__ import print_function import os import sys import argparse import warnings import numpy as np import scipy.stats as stats from scipy.special import gammaln from scipy import optimize import matplotlib.pyplot as plt from matplotlib.ticker import FormatStrFormatter import csv as csv...
mit
gfyoung/scipy
scipy/signal/filter_design.py
1
150871
"""Filter design. """ from __future__ import division, print_function, absolute_import 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, ...
bsd-3-clause
Kleptobismol/scikit-bio
skbio/stats/distance/_base.py
1
41154
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
bsd-3-clause
amolkahat/pandas
pandas/tests/test_multilevel.py
1
108622
# -*- coding: utf-8 -*- # pylint: disable-msg=W0612,E1101,W0141 from warnings import catch_warnings, simplefilter import datetime import itertools import pytest import pytz from numpy.random import randn import numpy as np from pandas.core.index import Index, MultiIndex from pandas import (Panel, DataFrame, Series, n...
bsd-3-clause
rallured/PyXFocus
examples/arcus/sector.py
1
48181
import numpy as np from numpy import sin,cos,exp,sqrt,pi,tan import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import pdb,sys,pickle,os import astropy.io.fits as pyfits import traces.grating as grat import utilities.plotting as plotting from traces.axro.SMARTX import CXCreflIr from scipy import in...
mit
aitatanit/filterpy
filterpy/kalman/kalman_filter.py
1
55033
# -*- coding: utf-8 -*- # pylint: disable=invalid-name, too-many-arguments, too-many-branches, # pylint: disable=too-many-locals, too-many-instance-attributes, too-many-lines """ This module implements the linear Kalman filter in both an object oriented and procedural form. The KalmanFilter class implements the filter...
mit
joshfuchs/ZZCeti_pipeline
diagnostics.py
1
36843
# -*- coding: utf-8 -*- """ Diagnostic Plots for Pipeline Author: Patrick O'Brien Date last updated: February 2017 """ # Import statements from glob import glob import os import numpy as np from matplotlib.backends.backend_pdf import PdfPages import matplotlib.pyplot as plt from PyPDF2 import PdfFileMerger import panda...
mit
lfairchild/PmagPy
dialogs/demag_dialogs.py
1
74061
#!/usr/bin/env python import matplotlib import numpy as np import wx import copy import os import pmagpy.pmag as pmag import pmagpy.ipmag as ipmag import matplotlib.pyplot as plt from matplotlib.figure import Figure from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigCanvas from matplotlib.backends....
bsd-3-clause
tcstewar/model-explorer
modex/view.py
1
31542
from ui import swi import webbrowser from ui.pytag import T from stats import Stats import stats import runner import os import re import matplotlib matplotlib.use('Agg') import pylab import StringIO import math def convert_string_to_value(x): if x=='True': return True if x=='False': return False try: ...
gpl-3.0
thekerrlab/netpyne
netpyne/analysis/network.py
1
51620
""" analysis/network.py Functions to plot and analyze connectivity-related results Contributors: salvadordura@gmail.com """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals from __future__ import absolute_import from builtins import open from builtins impo...
mit
epidataio/epidata-community
ipython/test/test_streaming_sensor_measurement.py
1
40948
# # Copyright (c) 2015-2017 EpiData, Inc. # from datetime import datetime, timedelta from epidata.context import ec from epidata.sensor_measurement import SensorMeasurement from epidata.utils import ConvertUtils from epidata.analytics import * import numpy from pyspark.sql import Row from pyspark.sql import Column fro...
apache-2.0
KrisCheng/ML-Learning
archive/MOOC/Deeplearning_AI/ImprovingDeepNeuralNetworks/HyperparameterTuning/Tensorflow+Tutorial.py
1
37910
# coding: utf-8 # # TensorFlow Tutorial # # Welcome to this week's programming assignment. Until now, you've always used numpy to build neural networks. Now we will step you through a deep learning framework that will allow you to build neural networks more easily. Machine learning frameworks like TensorFlow, Paddle...
mit
cogstat/cogstat
cogstat/cogstat_chart.py
1
39371
# -*- coding: utf-8 -*- """ This module contains functions for creating charts. """ import gettext import os import textwrap import matplotlib import matplotlib.pyplot as plt import matplotlib.pylab import numpy as np import pandas as pd from scipy import stats from statsmodels.graphics.mosaicplot import mosaic impor...
gpl-3.0
simpeg/processing
processing/DCIPtools/test.py
1
69898
{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "scrolled": true }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/Users/sgkang/Projects/simpeg/SimPEG/EM/Static/DC/IODC.py:13: UserWarning: code under construction - API might c...
mit
jefemagril/fermipy
fermipy/irfs.py
1
32592
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function import glob import re import numpy as np from scipy.interpolate import RegularGridInterpolator from scipy.interpolate import UnivariateSpline import healpy as hp from astropy.io import fits ...
bsd-3-clause
andreasvc/disco-dop
discodop/treesearch.py
1
51380
"""Objects for searching through collections of trees.""" # Possible improvements: # - cache raw results from _query() before conversion? # - return/cache trees as strings? import io import os import re import csv import sys import mmap import array import tempfile import subprocess import multiprocessing import conc...
gpl-2.0
rabrahm/ceres
feros/ferospipe_fp.py
1
79430
import sys import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages from pylab import * base = '../' sys.path.append(base+"utils/Correlation") sys.path.append(base+"utils/GLOBALutils") sys.path.append(base+"utils/OptExtract") sys.path.append(base+"...
mit
jamestwebber/scipy
scipy/optimize/_lsq/least_squares.py
1
38242
"""Generic interface for least-squares 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 _...
bsd-3-clause
JasonKessler/scattertext
scattertext/test/test_diachronicTermMiner.py
1
32298
from unittest import TestCase import io import pandas as pd from scattertext.CorpusFromParsedDocuments import CorpusFromParsedDocuments from scattertext.WhitespaceNLP import whitespace_nlp_with_sentences from scattertext.diachronic.DiachronicTermMiner import DiachronicTermMiner class TestDiachronicTermMiner(TestCase...
apache-2.0
agiovann/Constrained_NMF
caiman/source_extraction/cnmf/online_cnmf.py
1
132759
#!/usr/bin/env python """ Online Constrained Nonnegative Matrix Factorization The general file class which is used to analyze calcium imaging data in an online fashion using the OnACID algorithm. The output of the algorithm is storead in an Estimates class More info: ------------ Giovannucci, A., Friedrich, J., Kaufm...
gpl-2.0
tuqc/lyman
lyman/workflows/archive/restingstate.py
1
44473
""" Preprocessing for resting-state anaylsis See the docstring for get_preproc_workflow() for more information. """ import nipype.interfaces.io as io import nipype.interfaces.fsl as fsl import nipype.interfaces.freesurfer as fs import nipype.interfaces.utility as util import nipype.pipeline.engine as pe ...
bsd-3-clause
ashmanmode/TTSDNNRepo
src/run_merlin.py
1
57765
import cPickle import gzip import os, sys, errno import time import math import subprocess import socket # only for socket.getfqdn() # numpy & theano imports need to be done in this order (only for some numpy installations, not sure why) import numpy #import gnumpy as gnp # we need to explicitly import this in some...
apache-2.0
roughhawkbit/robs-python-scripts
toolbox_elmer.py
1
48287
#/usr/bin/python from __future__ import division from __future__ import with_statement import math import matplotlib from matplotlib import pyplot from mpl_toolkits.axes_grid1 import make_axes_locatable import numpy from numpy import mean as amean import os import re from scipy.spatial import Delaunay from scipy.spatia...
mit
chrjxj/zipline
zipline/algorithm.py
1
50802
# # Copyright 2014 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
apache-2.0
huanzhang12/lightgbm-gpu
python-package/lightgbm/sklearn.py
1
33115
# coding: utf-8 # pylint: disable = invalid-name, W0105, C0111, C0301 """Scikit-Learn Wrapper interface for LightGBM.""" from __future__ import absolute_import import numpy as np from .basic import Dataset, LightGBMError from .compat import (SKLEARN_INSTALLED, LGBMClassifierBase, LGBMDeprecated, ...
mit
tseaver/google-cloud-python
bigquery/tests/unit/test_magics.py
1
46662
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
gameduell/dask
dask/bag/core.py
1
55854
from __future__ import absolute_import, division, print_function from collections import Iterable, Iterator, defaultdict from functools import wraps, partial import itertools import math import os import types import uuid from random import Random from warnings import warn from distutils.version import LooseVersion f...
bsd-3-clause
rs2/pandas
pandas/tests/series/test_constructors.py
1
55233
from collections import OrderedDict from datetime import datetime, timedelta import numpy as np import numpy.ma as ma import pytest from pandas._libs import iNaT, lib from pandas.core.dtypes.common import is_categorical_dtype, is_datetime64tz_dtype from pandas.core.dtypes.dtypes import ( CategoricalDtype, Da...
bsd-3-clause
nelsonag/openmc
openmc/filter.py
1
65717
from abc import ABCMeta from collections import OrderedDict from collections.abc import Iterable import hashlib from itertools import product from numbers import Real, Integral from xml.etree import ElementTree as ET import numpy as np import pandas as pd import openmc import openmc.checkvalue as cv from .cell import...
mit
anirudhnair/KernelBasedCharcterization
TAUTraceAnalysis/Settings/Common.py
1
50546
''' Created on Feb 11, 2014 @author: anirudhj ''' import collections from dtw import dtw import pandas as pd import numpy as np import copy, os import matplotlib.pyplot as plt import scipy.spatial.distance as pydist import scipy.stats.mstats as systat from matplotlib.pyplot import figure, show #const defs EVENT_END_IN...
apache-2.0
gnarula/eden_deployment
controllers/msg.py
1
78697
# -*- coding: utf-8 -*- """ Messaging Module - Controllers """ module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) # ----------------------------------------------------------------------------- def index(): ...
mit
axbaretto/beam
sdks/python/apache_beam/dataframe/frames_test.py
1
52448
# # 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
idegtiarov/gnocchi-rep
gnocchi/tests/test_carbonara.py
1
35174
# -*- encoding: utf-8 -*- # # Copyright © 2014-2015 eNovance # # Authors: Julien Danjou <julien@danjou.info> # # 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/lic...
apache-2.0
m3wolf/xanespy
xanespy/xanes_math.py
1
42319
# -*- 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
jayhetee/dask
dask/dataframe/core.py
1
46137
from __future__ import division from itertools import count from math import sqrt from functools import wraps import bisect import uuid from hashlib import md5 from toolz import merge, partial, first, partition from operator import getitem, setitem from datetime import datetime import pandas as pd import numpy as np i...
bsd-3-clause
Silmathoron/nest-simulator
pynest/nest/lib/hl_api_types.py
1
32816
# -*- coding: utf-8 -*- # # hl_api_types.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, o...
gpl-2.0
sebotic/WikidataIntegrator
wikidataintegrator/wdi_core.py
1
157222
import copy import datetime import json import logging import os import re import time import warnings from collections import defaultdict from typing import List import pandas as pd import requests from pyshex import ShExEvaluator from rdflib import Graph from shexer.shaper import Shaper from wikidataintegrator.wdi_...
agpl-3.0
PersonalGenomesOrg/american-gut-web
amgut/lib/locale_data/british_gut.py
1
147269
#!/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
larrybradley/astropy
astropy/table/tests/test_table.py
1
102062
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from astropy.utils.tests.test_metadata import MetaBaseTest import gc import sys import copy from io import StringIO from collections import OrderedDict import pickle import pytest import numpy as np from numpy.testing import asser...
bsd-3-clause
svalenti/agnkey
trunk/src/agnkey/agnabsphotdef.py
1
52649
def deg2HMS(ra='', dec='', round=False): import string RA, DEC= '', '' if dec: if string.count(str(dec),':')==2: dec00=string.split(dec,':') dec0,dec1,dec2=float(dec00[0]),float(dec00[1]),float(dec00[2]) if '-' in str(dec0): DEC=(-1)*((dec2/60....
mit
timothyb0912/pylogit
src/pylogit/asym_logit.py
1
50536
# -*- coding: utf-8 -*- """ Created on Sun Feb 28 20:16:35 2016 @name: MultiNomial Asymmetric Logit--version 3 @author: Timothy Brathwaite @summary: Contains functions necessary for estimating multinomial asymmetric logit models (with the help of the "base_multinomial_cm.py" file) @notes: Dif...
bsd-3-clause
enochd/RMG-Py
rmgpy/rmg/main.py
1
62676
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2010 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of c...
mit
thermokarst/qiime2
qiime2/metadata/tests/test_metadata_column.py
1
36564
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2020, 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
hagne/atm-py
atmPy/aerosols/instruments/miniSASP/miniSASP.py
1
45927
# -*- coding: utf-8 -*- """ Created on Thu Mar 19 21:23:22 2015 @author: htelg """ import warnings import numpy as np import pandas as pd import pylab as plt from scipy import stats from atmPy.tools import array_tools, plt_tools from atmPy.tools import math_linear_algebra as mla # from scipy import integrate from ...
mit
thombashi/pytablewriter
pytablewriter/writer/_table_writer.py
1
39176
""" .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ import abc import copy import math import warnings from typing import Any, Dict, List, Mapping, Optional, Sequence, Union, cast import typepy from dataproperty import ( ColumnDataProperty, DataProperty, DataPropertyExtractor, Form...
mit
jseabold/statsmodels
statsmodels/regression/mixed_linear_model.py
4
104783
""" Linear mixed effects models are regression models for dependent data. They can be used to estimate regression relationships involving both means and variances. These models are also known as multilevel linear models, and hierarchical linear models. The MixedLM class fits linear mixed effects models to data, and p...
bsd-3-clause
sauloal/cnidaria
scripts/venv/lib/python2.7/site-packages/pandas/tseries/tests/test_period.py
1
120010
"""Tests suite for Period handling. Parts derived from scikits.timeseries code, original authors: - Pierre Gerard-Marchant & Matt Knox - pierregm_at_uga_dot_edu - mattknow_ca_at_hotmail_dot_com """ from datetime import datetime, date, timedelta from numpy.ma.testutils import assert_equal from pandas import Timesta...
mit
amirkdv/biseqt
experiments/blot_stats.py
1
31822
import numpy as np from matplotlib import pyplot as plt from matplotlib import gridspec from itertools import product from scipy.ndimage.filters import gaussian_filter1d import sys import logging from biseqt.blot import WordBlot, find_peaks, band_radius from biseqt.sequence import Alphabet from biseqt.stochastics imp...
bsd-3-clause
tillrohrmann/flink
flink-python/pyflink/table/table_environment.py
1
89049
################################################################################ # 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...
apache-2.0
plotly/python-api
packages/python/plotly/plotly/graph_objs/_ohlc.py
1
48985
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Ohlc(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "ohlc" _valid_props = { "close", "closesrc", "customdata", "customdatasrc",...
mit
cernanalysispreservation/analysis-preservation.cern.ch
cap/modules/experiments/utils/questionnaire.py
2
34335
# * coding: utf8 * # # This file is part of CERN Analysis Preservation Framework. # Copyright (C) 2016 CERN. # # CERN Analysis Preservation Framework 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 vers...
gpl-2.0
AleksanderLidtke/AnalyseScinetificArticles
DownloadArticles.py
1
38230
# -*- coding: utf-8 -*- """ Test downloading scientific articles' infomration from the web. Created on Sun Apr 19 20:46:55 2015 @author: alek """ import os, requests, re, difflib, time, numpy, subprocess, networkx, matplotlib.pyplot import nltk, string, sklearn.metrics, sklearn.cluster try: from selenium import ...
lgpl-3.0
lvphj/epydemiology
epydemiology/phjCleanUKPostcodes.py
1
99765
""" Functions to check postcode variable in Pandas dataframe ======================================================== These functions take a dataframe containing postcode information and attempts to correct errors and extract outward (first half), inward (second half) and postcode area (first letters) components of th...
mit
jcmgray/xyzpy
xyzpy/gen/farming.py
1
30481
"""Objects for labelling and succesively running functions. """ import os import shutil import functools import numpy as np import pandas as pd import xarray as xr from .prepare import ( _parse_fn_args, _parse_var_names, _parse_var_dims, _parse_var_coords, _parse_constants, _parse_resources, ...
mit