repo_name
string
path
string
copies
string
size
string
content
string
license
string
dssg/wikienergy
disaggregator/build/pandas/pandas/src/generate_code.py
1
65551
from __future__ import print_function # we only need to be able to run this file on 2.7 # don't introduce a pandas/pandas.compat import # or we get a bootstrapping problem from StringIO import StringIO header = """ cimport numpy as np cimport cython from libc.string cimport memmove from numpy cimport * from cpython...
mit
gamaanderson/artview
artview/components/plot_grid.py
1
48242
""" plot_grid.py Class instance used to make Display. """ # Load the needed packages import numpy as np import os import pyart from matplotlib.backends.qt_compat import is_pyqt5 if is_pyqt5(): from matplotlib.backends.backend_qt5agg import ( FigureCanvas, NavigationToolbar2QT as NavigationToolbar) else: ...
bsd-3-clause
yousrabk/mne-python
mne/cov.py
2
71662
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Denis A. Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import copy as cp import os from math import floor, ceil, log import itertools as itt import warnings from co...
bsd-3-clause
adrian-ionescu/apache-spark
python/pyspark/sql/types.py
2
58423
# # 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
wdbm/abstraction
abstraction.py
1
71601
# -*- coding: utf-8 -*- ################################################################################ # # # abstraction # # ...
gpl-3.0
cbertinato/pandas
pandas/tests/indexing/test_coercion.py
1
35743
import itertools import numpy as np import pytest import pandas.compat as compat import pandas as pd import pandas.util.testing as tm ############################################################### # Index / Series common tests which may trigger dtype coercions ######################################################...
bsd-3-clause
manahl/PyBloqs
pybloqs/block/table_formatters.py
1
44425
from collections import namedtuple import datetime import itertools import numbers from six import iteritems, string_types import numpy as np import pandas as pd import pybloqs.block.colors as colors OP_SUM = np.sum OP_MEAN = np.mean OP_NONE = None HEADER_ROW_NAME = '__JINJA_HEADER__' INDEX_COL_NAME = '__JINJA_INDE...
lgpl-2.1
uvchik/pvlib-python
pvlib/forecast.py
1
35561
''' The 'forecast' module contains class definitions for retreiving forecasted data from UNIDATA Thredd servers. ''' import datetime from netCDF4 import num2date import numpy as np import pandas as pd from requests.exceptions import HTTPError from xml.etree.ElementTree import ParseError from pvlib.location import Loca...
bsd-3-clause
EtienneCmb/ipywksp
wksp.py
1
31996
import ipywidgets.widgets as wdg from IPython.core.magics.namespace import NamespaceMagics from IPython.display import HTML, display, Javascript from IPython import get_ipython import numpy as np from pandas import DataFrame from types import ModuleType, FunctionType import os import pickle from time import sleep imp...
mit
SanPen/GridCal
src/GridCal/Engine/IO/dgs_parser.py
1
42848
# -*- coding: utf-8 -*- """ # This file is part of GridCal. # # GridCal is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # GridCal is ...
gpl-3.0
fraricci/pymatgen
pymatgen/electronic_structure/boltztrap2.py
3
31894
""" BoltzTraT2 is a python software interpolating band structures and computing materials properties from dft band structure using Boltzmann semi-classical transport theory. This module provides a pymatgen interface to BoltzTraT2. Some of the code is written following the examples provided in BoltzTraP2 BoltzTraT2 has...
mit
jeffery-do/Vizdoombot
doom/lib/python3.5/site-packages/dask/bag/core.py
1
55868
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...
mit
clarkfitzg/xray
xray/core/variable.py
1
34663
from datetime import timedelta import functools import itertools import numpy as np import pandas as pd from . import common from . import indexing from . import ops from . import utils from .pycompat import basestring, OrderedDict, zip, reduce, dask_array_type from .indexing import (PandasIndexAdapter, LazilyIndexed...
apache-2.0
SigridK/corpkit
corpkit/editor.py
1
45992
def editor(dataframe1, operation = None, dataframe2 = False, sort_by = False, keep_stats = False, keep_top = False, just_totals = False, threshold = 'medium', just_entries = False, skip_entries = False, ...
mit
vgteam/toil-vg
src/toil_vg/vg_calleval.py
1
50190
#!/usr/bin/env python2.7 """ vg_calleval.py: Compare vcfs with vcfeval. Option to make freebayes calls to use as baseline. Can run on vg_mapeval.py output. """ import argparse, sys, os, os.path, errno, random, subprocess, shutil, itertools, glob, tarfile import doctest, re, json, collections, time, timeit import lo...
apache-2.0
alexandrejaguar/publications
2019/skeletracks/generate_figures.py
1
31615
""" Copyright (C) 2018 Alexandre Fioravante de Siqueira This file is part of 'XXXXXX - Supplementary Material'. 'XXXXXX - Supplementary Material' 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 ...
gpl-3.0
Berreman4x4/Berreman4x4
Berreman4x4.py
1
68955
# Encoding: utf-8 # Copyright (C) 2012-2016 Olivier Castany # This program is free software (see LICENCE file) """Berreman4x4: module implementing Berreman's 4x4 matrix method. See file "documentation.pdf" """ import numpy import scipy.linalg, scipy.interpolate from numpy import pi, newaxis import matplotlib, matpl...
gpl-3.0
dougalsutherland/py-sdm
sdm/sdm.py
1
77301
#!/usr/bin/env python ''' Code to do classification with divergence kernels in SVMs, as in Dougal J. Sutherland, Liang Xiong, Barnabas Poczos, Jeff Schneider. Kernels on Sample Sets via Nonparametric Divergence Estimates. http://arxiv.org/abs/1202.0302 ''' from __future__ import division, print_function f...
bsd-3-clause
daviddesancho/MasterMSM
mastermsm/msm/msm.py
1
42712
""" This file is part of the MasterMSM package. """ import warnings import math from functools import reduce, cmp_to_key import itertools import numpy as np import networkx as nx import scipy.linalg as spla import matplotlib.pyplot as plt import multiprocessing as mp from ..msm import msm_lib class SuperMSM(object): ...
gpl-2.0
antgonza/qiita
qiita_db/processing_job.py
1
94484
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
cython-testbed/pandas
pandas/tests/frame/test_alter_axes.py
1
49435
# -*- coding: utf-8 -*- from __future__ import print_function import inspect import pytest from datetime import datetime, timedelta import numpy as np from pandas.compat import lrange, PY2 from pandas import (DataFrame, Series, Index, MultiIndex, RangeIndex, IntervalIndex, DatetimeIndex, Catego...
bsd-3-clause
thesgc/cbh_chembl_ws_extension
cbh_chembl_ws_extension/compounds.py
1
86187
from tastypie.resources import ALL from tastypie.resources import ALL_WITH_RELATIONS from tastypie.resources import ModelResource from django.conf import settings from django.conf.urls import * from django.core.exceptions import ObjectDoesNotExist from tastypie.authorization import Authorization from tastypie import ht...
mit
Erotemic/ibeis
ibeis/algo/graph/mixin_ibeis.py
1
52619
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import networkx as nx import pandas as pd import utool as ut import numpy as np import vtool_ibeis as vt # NOQA import six from ibeis.algo.graph import nx_utils as nxu from ibeis.algo.graph.state import POSTV, NE...
apache-2.0
letsgoexploring/fredpy-package
build/lib/fredpy/__init__.py
2
47252
import requests import dateutil import datetime import os import matplotlib.pyplot as plt import numpy as np import pandas as pd import warnings import statsmodels.api as sm import time tsa = sm.tsa # Read recession data data cycle_data = pd.read_csv('https://raw.githubusercontent.com/letsgoexploring/fredpy-package/gh...
mit
jskDr/jamespy
j3/jgrid.py
1
36490
""" grid search codes for machine learning """ from sklearn import cross_validation, cross_validation, grid_search, linear_model, svm, metrics import numpy as np import pandas as pd from operator import itemgetter import j3.jutil as jutil import jx3.jpyx as jpyx from j3.jsklearn import binary_model def gs_Lasso( xM,...
mit
ohspite/spectral
spectral/graphics/ndwindow.py
1
43401
######################################################################### # # ndwindow.py - This file is part of the Spectral Python (SPy) # package. # # Copyright (C) 2001-2012 Thomas Boggs # # Spectral Python is free software; you can redistribute it and/ # or modify it under the terms of the GNU General Pu...
gpl-2.0
cmunk/protwis
tools/management/commands/build_structure_angles.py
1
48707
from django.core.management.base import BaseCommand from django.db import connection import contactnetwork.pdb as pdb from structure.models import Structure, StructureVectors from residue.models import Residue from angles.models import ResidueAngle as Angle import Bio.PDB import copy import freesasa import io import ...
apache-2.0
chrsrds/scikit-learn
sklearn/metrics/ranking.py
1
39288
"""Metrics to assess performance on classification task given scores 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.gramfort@inria....
bsd-3-clause
basnijholt/holoviews
holoviews/plotting/bokeh/plot.py
1
45117
from __future__ import absolute_import, division, unicode_literals import json from itertools import groupby from collections import defaultdict import numpy as np import param from bokeh.layouts import gridplot from bokeh.models import (ColumnDataSource, Column, Row, Div) from bokeh.models.widgets import Panel, Tab...
bsd-3-clause
katelynneese/dmdd
dmdd/dmdd.py
1
65481
from numba import jit try: import rate_NR import rate_genNR import rate_UV import dmdd_efficiencies as eff import dmdd_plot as dp except ImportError: pass import os,os.path,shutil import pickle import logging import time on_rtd = False try: import numpy.random as random import...
mit
sauloal/cnidaria
scripts/venv/lib/python2.7/site-packages/pandas/tseries/tests/test_timeseries.py
1
168104
# pylint: disable-msg=E1101,W0612 import calendar from datetime import datetime, time, timedelta import sys import operator import nose import numpy as np randn = np.random.randn from pandas import (Index, Series, TimeSeries, DataFrame, isnull, date_range, Timestamp, Period, DatetimeIndex, ...
mit
buguen/pylayers
pylayers/gis/selectl.py
1
41721
# -*- coding: utf-8 -*- r""" .. currentmodule:: pylayers.gis.selectL """ import os import pdb import Image import numpy as np from pylayers.util import geomutil as geu from pylayers.util import pyutil as pyu import pylayers.util.plotutil as plu import matplotlib.pyplot as plt from pylayers.util.easygui import * from...
lgpl-3.0
harish2rb/pyGeoNet
pygeonet_v1.0/pygeonet_processing.py
1
49204
#! /usr/bin/env python # pygeonet_processing.py # Run this file after setting up folder structure # in pygeonet_parameters.py import sys import os from osgeo import gdal,osr,ogr import statsmodels.api as sm import numpy as np from time import clock import pygeonet_prepare as Parameters import pygeonet_defaults as defa...
gpl-3.0
wmvanvliet/mne-python
mne/viz/evoked.py
1
107767
# -*- coding: utf-8 -*- """Functions to plot evoked M/EEG data (besides topographies).""" # 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> # C...
bsd-3-clause
thilbern/scikit-learn
sklearn/tree/tree.py
1
34935
""" 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
dsm054/pandas
pandas/plotting/_converter.py
2
38760
import warnings from datetime import datetime, timedelta import datetime as pydt import numpy as np from dateutil.relativedelta import relativedelta import matplotlib.units as units import matplotlib.dates as dates from matplotlib.ticker import Formatter, AutoLocator, Locator from matplotlib.transforms import nonsin...
bsd-3-clause
jinook0707/CATOS_alpha
2016_paper/aa_dataviewer.py
1
45429
''' aa_dataviewer This is used for browsing video & audio data collected by CATOS_AA. It also shows some graph of recent performance of the subject. -------------------------------------------------------------------- Copyright (C) 2013 Jinook Oh (jinook.oh@univie.ac.at) This program is free software: you can redistri...
gpl-3.0
kapteyn-astro/kapteyn
kapteyn/wcsgrat.py
1
178433
#!/usr/bin/env python #---------------------------------------------------------------------- # FILE: wcsgrat.py # PURPOSE: Provide classes and methods to produce graticule data # for WCS labeling and plotting grid lines. # AUTHOR: M.G.R. Vogelaar, University of Groningen, The Netherlands # DATE: Augus...
bsd-3-clause
Didou09/tofu
tofu/geom/_comp.py
1
36936
""" This module is the computational part of the geometrical module of ToFu """ # Built-in import warnings # Common import numpy as np import scipy.interpolate as scpinterp import scipy.integrate as scpintg from inspect import signature as insp # ToFu-specific try: import tofu.geom._def as _def import tofu.g...
mit
CAMI-challenge/AMBER
src/binning_classes.py
1
46063
# Copyright 2021 Department of Computational Biology for Infection Research - Helmholtz Centre for Infection Research # # 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 Li...
apache-2.0
msincenselee/vnpy
vnpy/component/cta_renko_bar.py
1
231658
# encoding: UTF-8 import copy import csv import decimal import math import os import sys import traceback import talib as ta import numpy as np import pandas as pd import csv from collections import OrderedDict from datetime import datetime, timedelta from pykalman import KalmanFilter from vnpy.trader.object import ...
mit
chrsrds/scikit-learn
sklearn/gaussian_process/kernels.py
4
67426
"""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
ycaihua/scikit-learn
sklearn/feature_extraction/text.py
1
49514
# -*- coding: utf-8 -*- # Authors: Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Lars Buitinck <L.J.Buitinck@uva.nl> # Robert Layton <robertlayton@gmail.com> # Jochen Wersdörfer <jochen@wersdoerfer.de> # Roman Sinayev <roman.sinayev@gma...
bsd-3-clause
Djabbz/scikit-learn
sklearn/metrics/tests/test_classification.py
1
49779
from __future__ import division, print_function import numpy as np from scipy import linalg from functools import partial from itertools import product import warnings from sklearn import datasets from sklearn import svm from sklearn.datasets import make_multilabel_classification from sklearn.preprocessing import la...
bsd-3-clause
dblalock/bolt
experiments/python/matmul_datasets.py
1
30264
#!/usr/bin/env python # from future import absolute_import, division, print_function import os import numpy as np # import pathlib as pl from sklearn import linear_model from scipy import signal from python.datasets import caltech, sharee, incart, ucr from python import misc_algorithms as algo from python import win...
mpl-2.0
mtury/scapy
scapy/layers/inet.py
1
69806
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """ IPv4 (Internet Protocol v4). """ from __future__ import absolute_import from __future__ import print_function import time...
gpl-2.0
kwecht/BABS-GUI
code/interactiveplot.py
1
40428
######################################################################## # # Kevin Wecht 4 November 2014 # # Bay Area Bicycle Share (BABS) Open Data Challenge # ######################################################################## # # This file begins a Qt window to support interactive # ...
mit
Foorth/panda-bigmon-core
core/common/models.py
1
169949
# Create your models here. # This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # Feel free to rename the models, but don't rename db_table values or field names. # #...
apache-2.0
MJuddBooth/pandas
pandas/core/sparse/frame.py
1
37597
""" Data structures for sparse float data. Life is made simpler by dealing only with float64 data """ from __future__ import division import warnings import numpy as np from pandas._libs.sparse import BlockIndex, get_blocks import pandas.compat as compat from pandas.compat import lmap from pandas.compat.numpy import...
bsd-3-clause
rsmailach/MultiServerSRPT
SRPTE_Multi_KnownDist.py
1
45346
#----------------------------------------------------------------------# # SRPTE_Multi_KnownDist.py # # This application simulates multiple server with Poisson arrivals # and processing times of a general distribution. There are errors in # time estimates within a range. Arrivals are assigned to SRPT classes # small, ...
mit
willgrass/pandas
pandas/core/tests/test_datetools.py
1
36031
from datetime import datetime, timedelta import unittest from pandas.core.datetools import ( bday, BDay, BQuarterEnd, BMonthEnd, BYearEnd, MonthEnd, DateOffset, Week, YearBegin, YearEnd, Hour, Minute, Second, format, ole2datetime, to_datetime, normalize_date, getOffset, getOffsetName, inferTimeR...
bsd-3-clause
pratapvardhan/pandas
pandas/tests/indexing/test_coercion.py
2
35112
# -*- coding: utf-8 -*- import itertools import pytest import numpy as np import pandas as pd import pandas.util.testing as tm import pandas.compat as compat ############################################################### # Index / Series common tests which may trigger dtype coercions ##############################...
bsd-3-clause
nhejazi/scikit-learn
sklearn/ensemble/forest.py
8
78893
"""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
MapsPy/MapsPy
maps_calibration.py
1
78562
''' Created on Apr 10, 2013 @author: Mirna Lerotic, 2nd Look Consulting http://www.2ndlookconsulting.com/ Copyright (c) 2013, Stefan Vogt, Argonne National Laboratory All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the...
bsd-2-clause
kgullikson88/General
Fitters.py
1
88851
""" A set of functions for various types of fitting. """ import logging import os import glob import json from george import kernels import FittingUtilities from astropy import units as u, constants from scipy.optimize import fmin, brute, minimize from scipy.interpolate import InterpolatedUnivariateSpline as spline f...
gpl-3.0
trislett/TFCE_mediation
tfce_mediation/tm_func.py
1
30977
#!/usr/bin/env python # Various functions for I/O functions for tm mmr # Copyright (C) 2016 Tristram Lett # 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 th...
gpl-3.0
huzq/scikit-learn
sklearn/linear_model/tests/test_logistic.py
1
76163
import os import sys import numpy as np import scipy.sparse as sp from scipy import linalg, optimize, sparse import pytest from sklearn.base import clone from sklearn.datasets import load_iris, make_classification from sklearn.metrics import log_loss from sklearn.metrics import get_scorer from sklearn.model_selection...
bsd-3-clause
beiko-lab/gengis
bin/Lib/site-packages/matplotlib/backends/backend_pdf.py
3
91687
# -*- coding: iso-8859-1 -*- """ A PDF matplotlib backend Author: Jouni K Seppänen <jks@iki.fi> """ from __future__ import division, print_function import codecs import os import re import sys import time import warnings import zlib import numpy as np if sys.version_info[0] >= 3: from io import BytesIO else: ...
gpl-3.0
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/sklearn/metrics/metrics.py
2
33408
"""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 *_loss return a scalar value to minimize: the lower the better """ # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel...
agpl-3.0
DGrady/pandas
pandas/io/parsers.py
1
119746
""" Module contains tools for processing files into DataFrames or other objects """ from __future__ import print_function from collections import defaultdict import re import csv import sys import warnings import datetime from textwrap import fill import numpy as np from pandas import compat from pandas.compat import...
bsd-3-clause
linebp/pandas
pandas/tests/io/test_pytables.py
1
216490
import pytest import sys import os import tempfile from contextlib import contextmanager from warnings import catch_warnings import datetime from datetime import timedelta import numpy as np import pandas import pandas as pd from pandas import (Series, DataFrame, Panel, Panel4D, MultiIndex, Int64Index, ...
bsd-3-clause
xhochy/arrow
python/pyarrow/tests/test_array.py
1
85345
# 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
0x0all/scikit-learn
sklearn/metrics/tests/test_common.py
2
42461
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, MultiLabelBinarizer from sklearn.utils.multiclass impo...
bsd-3-clause
merenlab/anvio
anvio/parsers/hmmer.py
1
41181
# -*- coding: utf-8 """Parser for HMMER's various outputs""" import anvio import anvio.utils as utils import anvio.terminal as terminal from anvio.errors import ConfigError from anvio.parsers.base import Parser import os import numpy as np import pandas as pd __author__ = "Developers of anvi'o (see AUTHORS.txt)" _...
gpl-3.0
ncss-tech/geo-pit
SSURGO_Assessment_Tools/Validate_Mapunit_Slope_Range.py
1
78474
#------------------------------------------------------------------------------- # Name: Validate Mapunit Slope Range # Purpose: # # Author: Adolfo.Diaz # e-mail: adolfo.diaz@wi.usda.gov # phone: 608.662.4422 ext. 216 # # This tool is intended to help validate a user-defined slope range that is assigned ...
gpl-2.0
chenkianwee/envuo
py4design/urbanformeval.py
1
86231
# ================================================================================================== # # Copyright (c) 2016, Chen Kian Wee (chenkianwee@gmail.com) # # This file is part of py4design # # py4design is free software: you can redistribute it and/or modify # it under the terms of the GNU General ...
gpl-3.0
prheenan/Research
Personal/EventDetection/OtherMethods/Roduit2012_OpenFovea/openfovea_src/openfovea/fovea_toolbox/opengl.py
1
32364
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ This opengl code was higly inspired from the pyopengl documentation, and particularly on the NeHe tutorials, thank's a lot to them ! """ from copy import deepcopy import numpy from OpenGL.GL import * from OpenGL.GLUT import * from OpenGL.GLU import * from gtk....
gpl-3.0
rs2/pandas
pandas/tests/dtypes/test_dtypes.py
1
34835
import re import numpy as np import pytest import pytz from pandas.core.dtypes.base import registry from pandas.core.dtypes.common import ( is_bool_dtype, is_categorical, is_categorical_dtype, is_datetime64_any_dtype, is_datetime64_dtype, is_datetime64_ns_dtype, is_datetime64tz_dtype, ...
bsd-3-clause
jseabold/statsmodels
statsmodels/tsa/statespace/news.py
4
49282
# -*- coding: utf-8 -*- """ News for state space models Author: Chad Fulton License: BSD-3 """ import numpy as np import pandas as pd from statsmodels.iolib.table import SimpleTable from statsmodels.iolib.summary import Summary from statsmodels.iolib.tableformatting import fmt_params class NewsResults(object): ...
bsd-3-clause
kubeflow/pipelines
samples/contrib/e2e-outlier-drift-explainer/seldon/seldon_e2e_cifar10.kale.nfs.py
2
69331
import kfp.dsl as dsl import json import kfp.components as comp from collections import OrderedDict from kubernetes import client as k8s_client def setup(MINIO_ACCESS_KEY: str, MINIO_HOST: str, MINIO_MODEL_BUCKET: str, MINIO_SECRET_KEY: str): pipeline_parameters_block = ''' MINIO_ACCESS_KEY = "{}" MINIO_H...
apache-2.0
csb-toolbox/CSB
csb/bio/nmr/__init__.py
1
38131
""" NMR related objects. """ import os import numpy.linalg import xml.dom.minidom import csb.io.tsv import csb.core as pu from csb.statistics.pdf import GeneralizedNormal from csb.bio.sequence import ProteinAlphabet from csb.bio.structure import ChemElements class InvalidResidueError(ValueError): pass class E...
mit
IBT-FMI/SAMRI
samri/pipelines/extra_functions.py
1
36883
# -*- coding: utf-8 -*- import csv import inspect import os import re import json import shutil from copy import deepcopy import pandas as pd # PyBIDS 0.6.5 and 0.10.2 compatibility try: from bids.grabbids import BIDSLayout except ModuleNotFoundError: from bids.layout import BIDSLayout BEST_GUESS_MODALITY_MATCH = ...
gpl-3.0
DittmarLab/HGTector
hgtector/analyze.py
1
41061
#!/usr/bin/env python3 # ---------------------------------------------------------------------------- # Copyright (c) 2013--, Qiyun Zhu and Katharina Dittmar. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # --------------------...
bsd-3-clause
squirrelo/qiita
qiita_db/test/test_util.py
1
38206
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
mbinkowski/opt-mmd
gan/model_mmd2.py
1
60873
from __future__ import division, print_function from glob import glob import os import time import numpy as np import scipy.misc import scipy from six.moves import xrange import tensorflow as tf import matplotlib.pyplot as plt from PIL import Image import lmdb import io import sys from IPython.display import display ...
bsd-3-clause
phockett/ePSproc
epsproc/geomFunc/geomCalc.py
1
48876
""" ePSproc geometric terms/functions Collection of codes for geometric functions and tensors. 26/02/20 v1 Initial implementation. """ # Imports import numpy as np import pandas as pd import xarray as xr # Fast calc functions from epsproc.geomFunc.w3jVecMethods import w3jguVecCPU, w3jprange # from epsproc.geom...
gpl-3.0
mikehankey/fireball_camera
analyze-stacks.py
1
55222
#!/usr/bin/python3 # next steps. save off a cache of the diffs,so we can save time on multiple re-runs. # do a crop cnt confirm. # script to make master stacks per night and hour from the 1 minute stacks from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figur...
gpl-3.0
jgliss/pyplis
pyplis/processing.py
1
48843
# -*- coding: utf-8 -*- # # Pyplis is a Python library for the analysis of UV SO2 camera data # Copyright (C) 2017 Jonas Gliss (jonasgliss@gmail.com) # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License a # published by the Free Software Foundat...
gpl-3.0
jackmorford/SPPlot
SPPlot.py
1
67616
######################################### ### ## ### ###### ### # ### ## ##### ## ## ##### ### #### ##### ##### ### #### ### ##### ### #### ##### ##### #### ### ##### ##### ### #### ##### ##### # #### ##### ### ##### ##### ##### ######################################### #########################...
mit
google/expt-analysis
python/sequential_data.py
1
43661
# # Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
apache-2.0
jmikko/fairnessML
experiments.py
1
51113
from load_data import load_experiments from sklearn import svm import numpy as np from measures import equalized_odds_measure_TP, equalized_odds_measure_FP, equalized_odds_measure_from_pred_TP, equalized_odds_measure_TP_from_list_of_sensfeat import matplotlib.pyplot as plt from sklearn.model_selection import GridSearch...
gpl-3.0
bdh1011/wau
venv/lib/python2.7/site-packages/pandas/io/tests/test_parsers.py
1
142560
# -*- coding: utf-8 -*- # pylint: disable=E1101 from datetime import datetime import csv import os import sys import re import nose import platform from numpy import nan import numpy as np from pandas.io.common import DtypeWarning from pandas import DataFrame, Series, Index, MultiIndex, DatetimeIndex from pandas.com...
mit
nmayorov/scipy
scipy/integrate/_quadrature.py
3
32783
import functools import numpy as np import math import types import warnings # trapezoid is a public function for scipy.integrate, # even though it's actually a NumPy function. from numpy import trapz as trapezoid from scipy.special import roots_legendre from scipy.special import gammaln __all__ = ['fixed_quad', 'qua...
bsd-3-clause
PaulDeStefano/pythonsamples
newAnalyser.py
1
50063
#!/usr/bin/python2.7 """ newAnalyser.py Analyse ToF TIC data. Copyright (C) 2013 Paul R. DeStefano 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...
gpl-3.0
colour-science/colour
colour/plotting/colorimetry.py
1
32440
# -*- coding: utf-8 -*- """ Colorimetry Plotting ==================== Defines the colorimetry plotting objects: - :func:`colour.plotting.plot_single_sd` - :func:`colour.plotting.plot_multi_sds` - :func:`colour.plotting.plot_single_cmfs` - :func:`colour.plotting.plot_multi_cmfs` - :func:`colour.plotting.plot...
bsd-3-clause
MDAnalysis/mdanalysis
testsuite/MDAnalysisTests/analysis/test_encore.py
1
36155
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # MDAnalysis --- https://www.mdanalysis.org # Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) #...
gpl-2.0
alephu5/Soundbyte
environment/lib/python3.3/site-packages/pandas/tests/test_multilevel.py
1
67642
# pylint: disable-msg=W0612,E1101,W0141 import nose from numpy.random import randn import numpy as np from pandas.core.index import Index, MultiIndex from pandas import Panel, DataFrame, Series, notnull, isnull from pandas.util.testing import (assert_almost_equal, assert_series_equal...
gpl-3.0
ODM2/ODMToolsPython
odmtools/gui/mnuRibbon.py
1
32438
from collections import OrderedDict import datetime import wx import wx.lib.agw.ribbon as RB from wx.lib.pubsub import pub as Publisher from odmtools.common.exceptions import EmptySelection from odmtools.controller.frmAddPoints import AddPoints from odmtools.controller.frmDataFilters import frmDataFilter from odmto...
bsd-3-clause
Kate-Willett/HadISDH_Build
F13_GridHadISDHFLAT.py
1
47626
# PYTHON 3 # # Author: Kate Willett # Created: 1 February 2013 IDL, Converted to Python 3 12th Jan 2021 # Last update: 12 January 2021 # Location: /home/h04/hadkw/HadISDH_Code/HADISDH_BUILD/ # GitHub: https://github.com/Kate-Willett/HadISDH_Build # ----------------------- # CODE PURPOSE AND OUTPUT # -----------...
cc0-1.0
tkchafin/mrbait
mrbait/manage_bait_db.py
1
50978
#!/usr/bin/python import sys import sqlite3 from sqlite3 import OperationalError import pandas as pd from mrbait import misc_utils as utils from mrbait import sequence_tools as s #Function to create database connection #Add code later to enable re-running from existing database def create_connection(db): conn = sqli...
gpl-3.0
maurov/xraysloth
sloth/io/specfile_reader.py
1
32130
#!/usr/bin/env python # -*- coding: utf-8 -*- """SpecfileData object to read data in SPEC_ format =================================================== .. _SPEC: http://www.certif.com/content/spec Requirements ------------ - silx (http://www.silx.org/doc/silx/dev/modules/io/specfilewrapper.html) TODO ---- - _pymca_av...
bsd-3-clause
jbms/beancount-import
beancount_import/reconcile.py
1
40649
import collections import datetime import re from typing import List, Optional, Union, Callable, Dict, Mapping, Tuple, Any, Iterable, Set, NamedTuple import argparse import os import tempfile import hashlib import string import random import pickle from beancount.core.data import Transaction, Posting, Balance, Open, C...
gpl-2.0
merenlab/anvio
anvio/variabilityops.py
1
167423
# -*- coding: utf-8 # pylint: disable=line-too-long """Classes to make sense of sequence variation""" import os import sys import copy import random import inspect import argparse import numpy as np import pandas as pd import operator as op from numba import jit from scipy.stats import entropy import anvio import ...
gpl-3.0
Shirling-VT/davitpy_sam
davitpy/gme/sat/poes.py
1
33273
""" .. module:: poes :synopsis: A module for reading, writing, and storing poes Data .. moduleauthor:: AJ, 20130129 ********************* **Module**: gme.sat.poes ********************* **Classes**: * :class:`poesRec` **Functions**: * :func:`readPoes` * :func:`readPoesFtp` * :func:`mapPoesMongo` * :func:`...
gpl-3.0
bartosh/zipline
tests/pipeline/test_blaze.py
3
70826
""" Tests for the blaze interface to the pipeline api. """ from __future__ import division from collections import OrderedDict from datetime import timedelta, time from itertools import product, chain import warnings import blaze as bz from datashape import dshape, var, Record from nose_parameterized import parameter...
apache-2.0
ADicksonLab/wepy
src/wepy/analysis/contig_tree.py
1
70401
"""Classes providing a contig and branching contigs abstractions over the underlying WepyHDF5 simulation data store. Routines -------- ContigTree Contig """ import itertools as it from copy import copy from operator import attrgetter from collections import deque import networkx as nx import numpy as np from matpl...
mit
longjon/numpy
numpy/lib/function_base.py
1
117972
from __future__ import division, absolute_import, print_function __docformat__ = "restructuredtext en" __all__ = [ 'select', 'piecewise', 'trim_zeros', 'copy', 'iterable', 'percentile', 'diff', 'gradient', 'angle', 'unwrap', 'sort_complex', 'disp', 'extract', 'place', 'vectorize', 'asarray_chkfinite', 'ave...
bsd-3-clause
dcherian/tools
ROMS/pmacc/tools/post_tools/rompy/trunk/rompy/utils.py
1
43829
import os import numpy as np from matplotlib.mlab import griddata import netCDF4 as nc __version__ = '0.1.6' def interp_2d_latlon(lat,lon,data,lati,loni): return griddata(lat.reshape(lat.size),lon.reshape(lon.size),data.reshape(data.size),lati,loni) def interp_2d_xy(x,y,data,xi,yi): try: di = griddata(x.reshape...
mit
stefanv/brainx
brainx/util.py
1
43491
"""Generic utilities that may be needed by the other modules. """ #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- import warnings import numpy as np import networkx as nx #-------------------------...
bsd-3-clause
aCOSMIC/aCOSMIC
cosmic/utils.py
1
43425
# -*- coding: utf-8 -*- # Copyright (C) Scott Coughlin (2017 - 2019) # # This file is part of cosmic. # # cosmic 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 o...
gpl-3.0