repo_name
string
path
string
copies
string
size
string
content
string
license
string
Tong-Chen/scikit-learn
sklearn/metrics/metrics.py
1
75466
# -*- coding: utf-8 -*- """Utilities to evaluate the predictive performance of models Functions named as ``*_score`` return a scalar value to maximize: the higher the better Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize: the lower the better """ # Authors: Alexandre Gramfort <alexandr...
bsd-3-clause
runt18/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/text.py
1
55450
""" Classes for including text in a figure. """ from __future__ import division import math import numpy as np from matplotlib import cbook from matplotlib import rcParams import artist from artist import Artist from cbook import is_string_like, maxdict from font_manager import FontProperties from patches import bbox...
agpl-3.0
mdepasca/miniature-adventure
miniature_adventure.py
1
51544
import argparse import os from os import path import subprocess import sys import socket import time import warnings from math import floor import gc # garbage collector import smtplib import numpy as np from scipy import signal, linalg from matplotlib import pyplot as plt import GPy import classes as cls import util...
unlicense
yousrabk/mne-python
mne/viz/ica.py
1
30591
"""Functions to plot ICA specific data (besides topographies) """ from __future__ import print_function # Authors: Denis Engemann <denis.engemann@gmail.com> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Teon Brooks <teon.brooks@gmail.com> # # License: Simplified BSD from functools...
bsd-3-clause
great-expectations/great_expectations
great_expectations/validator/validator.py
1
64280
import copy import datetime import inspect import json import logging import traceback import warnings from collections import defaultdict, namedtuple from collections.abc import Hashable from typing import Any, Dict, Iterable, List, Optional, Set import pandas as pd from dateutil.parser import parse from tqdm.auto im...
apache-2.0
MikeDMorgan/gwas_pipeline
PipelineGWAS.py
1
213238
######################################################################### ######################################################################### # Classes for handling genome-wide association input and output files, ## # analysis and qc programs, and post-hoc analyses ## ########################...
mit
ucsd-ccbb/Oncolist
src/restLayer/app/TermIdentifier.py
1
36204
__author__ = 'aarongary' import sys import pymongo import requests import MyGeneInfo from itertools import islice from app.util import set_status, create_edges_index from app.status import Status from bson.json_util import dumps from models.TermResolver import TermAnalyzer import ElasticSearch import os from sklearn.l...
mit
WojciechMigda/KAGGLE-prudential-life-insurance-assessment
src/XGB_offset_reg.py
1
90763
#!/opt/anaconda2/bin/python # -*- coding: utf-8 -*- """ ################################################################################ # # Copyright (c) 2016 Wojciech Migda # All rights reserved # Distributed under the terms of the MIT license # ####################################################################...
mit
Winand/pandas
pandas/core/internals.py
1
186942
import copy from warnings import catch_warnings import itertools import re import operator from datetime import datetime, timedelta, date from collections import defaultdict from functools import partial import numpy as np from pandas.core.base import PandasObject from pandas.core.dtypes.dtypes import ( Extensio...
bsd-3-clause
ligo-cbc/pycbc
pycbc/types/timeseries.py
1
42880
# Copyright (C) 2014 Tito Dal Canton, Josh Willis, Alex Nitz # # 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 version. # # This...
gpl-3.0
wronk/mne-python
mne/epochs.py
1
129010
# -*- coding: utf-8 -*- """Tools for working with epoched data""" # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de> # Denis Engemann <denis.engemann@gmail.com> # ...
bsd-3-clause
brclark-usgs/flopy
flopy/utils/reference.py
1
57544
""" Module spatial referencing for flopy model objects """ import sys import os import numpy as np import warnings class SpatialReference(object): """ a class to locate a structured model grid in x-y space Parameters ---------- delr : numpy ndarray the model discretiza...
bsd-3-clause
yuginboy/from_GULP_to_FEFF
feff/libs/GaMnAs_sub_classes.py
1
33150
''' * Created by Zhenia Syryanyy (Yevgen Syryanyy) * e-mail: yuginboy@gmail.com * License: this code is under GPL license * Last modified: 2017-10-18 ''' import sys import os from copy import deepcopy from collections import OrderedDict as odict from itertools import cycle from io import StringIO import inspect import ...
gpl-3.0
GuessWhoSamFoo/pandas
pandas/core/panel.py
1
55911
""" Contains data structures designed for manipulating panel (3-dimensional) data """ # pylint: disable=E1103,W0231,W0212,W0621 from __future__ import division import warnings import numpy as np import pandas.compat as compat from pandas.compat import OrderedDict, map, range, u, zip from pandas.compat.numpy import f...
bsd-3-clause
craft-ai/craft-ai-client-python
tests/test_pandas.py
1
33216
import unittest from random import random from craft_ai.pandas import CRAFTAI_PANDAS_ENABLED if CRAFTAI_PANDAS_ENABLED: import copy import pandas as pd from numpy.random import randn import craft_ai.pandas from .data import pandas_valid_data, valid_data from .utils import generate_entity_id...
bsd-3-clause
puruckertom/ubertool
ubertool/kabam/kabam_functions.py
1
42339
from __future__ import division #brings in Python 3.0 mixed type calculation rules from functools import wraps import logging import numpy as np import pandas as pd import time from math import exp class KabamFunctions(object): """ Function class for Kabam. """ def __init__(self): """Class r...
unlicense
khile/botbot
botbot/bangs.py
1
88080
BANG_DICT = { "!allegro": "Allegro", "!cakebook": "CakePHP Cookbook", "!animeka": "Animeka", "!webcams": "webcams.travel", "!ipernity": "Ipernity", "!trademe": "TradeMe", "!anidb": "aniDB", "!nuget": "nuget gallery", "!pgp": "MIT PGP Public Key Server Lookup", "!endthelie": "End ...
mit
bmazin/ARCONS-pipeline
util/ObsFileSeqV2.py
1
33310
import os import math import time import warnings import numpy as np from util import FileName from util import ObsFile from util import TCS from interval import interval import pyfits import matplotlib.pyplot as plt import pickle from headers.DisplayStackHeaders import writeImageStack, readImageStack class ObsFileS...
gpl-2.0
legacysurvey/pipeline
validationtests/quicksipManera3.py
1
51044
from math import * import numpy as np import healpy as hp import astropy.io.fits as pyfits import time import matplotlib.pyplot as plt from multiprocessing import Pool from multiprocessing.dummy import Pool as ThreadPool import numpy.random import os, errno import subprocess twopi = 2.*pi piover2 = .5*pi verbose = Fals...
gpl-2.0
philouc/pyhrf
python/pyhrf/sandbox/physio.py
1
30326
import os.path as op import numpy as np from pyhrf import Condition from pyhrf.paradigm import Paradigm from pyhrf.tools import Pipeline import pyhrf.boldsynth.scenarios as simbase PHY_PARAMS_FRISTON00 = { 'model_name' : 'Friston00', 'tau_s' : 1/.8, 'eps' : .5, 'eps_max': 10., #TODO: check this '...
gpl-3.0
jni/cellom2tif
cellom2tif/tifffile.py
1
173408
#!/usr/bin/env python # -*- coding: utf-8 -*- # tifffile.py # Copyright (c) 2008-2014, Christoph Gohlke # Copyright (c) 2008-2014, The Regents of the University of California # Produced at the Laboratory for Fluorescence Dynamics # All rights reserved. # # Redistribution and use in source and binary forms, with or w...
bsd-3-clause
0asa/scikit-learn
sklearn/utils/estimator_checks.py
1
37529
from __future__ import print_function import warnings import sys import traceback import inspect import pickle import numpy as np from scipy import sparse import struct from sklearn.externals.six.moves import zip from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_equal from skle...
bsd-3-clause
uprm-research-resto/coliform-project
Coliform/GUI.py
1
42197
#!/usr/bin/env python3 # # This is the main GUI function for Coliform Project # # This file is part of Coliform. https://github.com/Regendor/coliform-project # (C) 2016 # Author: Osvaldo E Duran # Licensed under the GNU General Public License version 3.0 (GPL-3.0) import os import time import sys try: import matplo...
gpl-3.0
mhogg/BMDanalyse
BMDanalyse/MainWindow.py
1
30163
# -*- coding: utf-8 -*- # Copyright (C) 2016 Michael Hogg # This file is part of BMDanalyse - See LICENSE.txt for information on usage and redistribution import os, matplotlib, matplotlib.pyplot, types import numpy as np from pyqtgraph.Qt import QtCore, QtGui from pyqtgraph import ImageItem from pyqtgraph.widgets.Gr...
mit
maschwanden/boxsimu
boxsimu/solver.py
1
31181
# -*- coding: utf-8 -*- """ Created on Thu Jun 23 2016 at 10:37UTC @author: Mathias Aschwanden (mathias.aschwanden@gmail.com) """ import os import pdb import copy import time as time_module import datetime import numpy as np import dill as pickle import matplotlib.pyplot as plt from attrdict import AttrDict import m...
mit
shoyer/xarray
xarray/core/indexing.py
1
51766
import enum import functools import operator from collections import defaultdict from contextlib import suppress from datetime import timedelta from typing import Any, Callable, Iterable, Sequence, Tuple, Union import numpy as np import pandas as pd from . import duck_array_ops, nputils, utils from .npcompat import D...
apache-2.0
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/core/indexes/multi.py
1
99739
# pylint: disable=E1101,E1103,W0232 import datetime import warnings from functools import partial from sys import getsizeof import numpy as np from pandas._libs import index as libindex, lib, Timestamp from pandas.compat import range, zip, lrange, lzip, map from pandas.compat.numpy import function as nv from pandas ...
apache-2.0
anntzer/scikit-learn
sklearn/ensemble/_weight_boosting.py
2
43115
"""Weight Boosting. This module contains weight boosting estimators for both classification and regression. The module structure is the following: - The `BaseWeightBoosting` base class implements a common ``fit`` method for all the estimators in the module. Regression and classification only differ from each oth...
bsd-3-clause
timothyclemansinsea/smc
src/smc_sagews/smc_sagews/sage_server.py
1
74536
#!/usr/bin/env python """ sage_server.py -- unencrypted forking TCP server. Note: I wrote functionality so this can run as root, create accounts on the fly, and serve sage as those accounts. Doing this is horrendous from a security point of view, and I'm definitely not doing this. None of that functionality is actua...
gpl-3.0
yavalvas/yav_com
build/matplotlib/lib/matplotlib/mathtext.py
1
111273
r""" :mod:`~matplotlib.mathtext` is a module for parsing a subset of the TeX math syntax and drawing them to a matplotlib backend. For a tutorial of its usage see :ref:`mathtext-tutorial`. This document is primarily concerned with implementation details. The module uses pyparsing_ to parse the TeX expression. .. _p...
mit
saltastro/pysalt
saltspec/InterIdentify.py
1
46552
# Copyright (c) 2009, South African Astronomical Observatory (SAAO) # # All rights reserved. See LICENSE for more details # """INTERIDENTIFY provides an interactive method for identifying lines in an arc image. The tasks displays the full image, a line extracted from the image, and resid...
bsd-3-clause
pcmagic/stokes_flow
codeStore/support_fun_table.py
1
139054
# coding: utf-8 # !/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Sep 19 11:05:23 2017 @author: zhangji """ import matplotlib import subprocess import os devnull = open(os.devnull, 'w') latex_installed = not subprocess.call(['which', 'latex'], stdout=devnull, stderr=devnull) matplotlib.use('agg') fo...
mit
jpn--/larch
larch/data_services/h5/h5pod/generic.py
1
31510
import os from pathlib import Path import tables as tb import numpy import pandas import logging from ....util import Dict from ....util.aster import asterize from ....util.text_manip import truncate_path_for_display from ... import _reserved_names_ from ...pod import Pod from ...general import _sqz_same, selector_len...
gpl-3.0
kain88-de/mdanalysis
package/MDAnalysis/analysis/encore/similarity.py
1
64696
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # # Released under th...
gpl-2.0
johnowhitaker/bobibabber
sklearn/hmm.py
1
48255
# Hidden Markov Models # # Author: Ron Weiss <ronweiss@gmail.com> # and Shiqiao Du <lucidfrontier.45@gmail.com> # API changes: Jaques Grobler <jaquesgrobler@gmail.com> """ The :mod:`sklearn.hmm` module implements hidden Markov models. **Warning:** :mod:`sklearn.hmm` is orphaned, undocumented and has known numerical s...
mit
cpcloud/numpy
numpy/lib/function_base.py
2
123894
from __future__ import division, absolute_import, print_function import warnings import sys import collections import operator import numpy as np import numpy.core.numeric as _nx from numpy.core import linspace, atleast_1d, atleast_2d from numpy.core.numeric import ( ones, zeros, arange, concatenate, array, asarr...
bsd-3-clause
bgris/ODL_bgris
lib/python3.5/site-packages/spyder/config/main.py
1
30624
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ Spyder configuration options Note: Leave this file free of Qt related imports, so that it can be used to quickly load a user config file """ import...
gpl-3.0
effigies/PySurfer
surfer/viz.py
1
110278
import os from os.path import join as pjoin from tempfile import mkdtemp from warnings import warn import numpy as np from scipy import stats, ndimage, misc from scipy.interpolate import interp1d from matplotlib.colors import colorConverter import nibabel as nib from mayavi import mlab from mayavi.tools.mlab_scene_m...
bsd-3-clause
datasnakes/Datasnakes-Scripts
OrthoEvol/Tools/pbs/qstat.py
1
42077
import asyncio import csv import json import os import subprocess as sp import sys from collections import OrderedDict from datetime import datetime from pathlib import Path from time import sleep import pandas as pd import plotly import plotly.graph_objs as go import yaml from dateutil import parser from pkg_resource...
mit
rs2/pandas
pandas/tests/reshape/merge/test_merge.py
1
78056
from collections import OrderedDict from datetime import date, datetime, timedelta import random import re import numpy as np import pytest from pandas.core.dtypes.common import is_categorical_dtype, is_object_dtype from pandas.core.dtypes.dtypes import CategoricalDtype import pandas as pd from pandas import ( C...
bsd-3-clause
anntzer/seaborn
seaborn/relational.py
1
49844
from textwrap import dedent import warnings import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt from ._core import ( VectorPlotter, ) from .utils import ( ci_to_errsize, locator_to_legend_entries, ci as ci_func ) from .algorithms import bootstrap from .axisg...
bsd-3-clause
Chilipp/nc2map
evaluators.py
1
32393
# -*- coding: utf-8 -*- """Evaluators module of the nc2map package. This module (currently) contains two evaluators of MapBase instances plus the base class. Classes are: - EvaluatorBase: (Subclass of MapsManager). Base class for all evaluators (this class itself does nothing but provide the general framework...
gpl-2.0
aerler/HGS-Tools
Python/geospatial/xarray_tools.py
1
40502
''' Created on Feb. 23, 2019 Utility functions to extract data from xarray Dataset or DataArray classes. @author: Andre R. Erler, GPL v3 ''' from warnings import warn from datetime import datetime import os import numpy as np import xarray as xr import netCDF4 as nc from dask.diagnostics import ProgressBar # intern...
gpl-3.0
jenfly/monsoon-onset
scratchpad.py
1
38032
import sys sys.path.append('/home/jwalker/dynamics/python/atmos-tools') sys.path.append('/home/jwalker/dynamics/python/atmos-read') import numpy as np import xarray as xray import pandas as pd import matplotlib.pyplot as plt import numpy as np from pydap.client import open_url import atmos as atm import merra import ...
mit
RoozbehFarhoodi/McNeuron
McNeuron/Neuron.py
1
70044
import sys import numpy as np from numpy import mean, cov, dot, transpose from numpy import linalg as LA import math from scipy.sparse import csr_matrix from __builtin__ import str from copy import deepcopy import matplotlib.pyplot as plt from numpy.linalg import inv #np.random.seed(0) class Neuron(object): """Ne...
mit
rustychris/stompy
stompy/grid/front.py
1
109620
""" An advancing front grid generator for use with unstructured_grid Largely a port of paver.py. """ from __future__ import print_function import math import numpy as np from collections import defaultdict import time from scipy import optimize as opt import pdb import logging log=logging.getLogger(__name__) from s...
mit
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/core/generic.py
1
265103
# pylint: disable=W0231,E1101 import collections import warnings import operator import weakref import gc import json import numpy as np import pandas as pd from pandas._libs import tslib, lib, properties from pandas.core.dtypes.common import ( _ensure_int64, _ensure_object, is_scalar, is_number, ...
apache-2.0
rustychris/stomel
src/live_dt.py
1
81184
# Maintain a live constrained delaunay triangulation of the grid. # designed as a mixin import traceback import sys import pdb import orthomaker,trigrid from collections import Iterable import numpy as np class MissingConstraint(Exception): pass def distance_left_of_line(pnt, qp1, qp2): # return the signed ...
gpl-2.0
jakobrunge/tigramite
tigramite/independence_tests/oracle_conditional_independence.py
1
66715
"""Tigramite causal discovery for time series.""" # Author: Jakob Runge <jakob@jakob-runge.com> # # License: GNU General Public License v3.0 from __future__ import print_function import numpy as np from collections import defaultdict, OrderedDict from itertools import combinations, permutations class OracleCI: ...
gpl-3.0
evidation-health/bokeh
bokeh/crossfilter/models.py
1
30616
from __future__ import absolute_import import logging import six import pandas as pd import numpy as np from ..plotting import curdoc from ..models import ColumnDataSource, GridPlot, Panel, Tabs, Range from ..models.widgets import Select, MultiSelect, InputWidget # crossfilter plotting utilities from .plotting impo...
bsd-3-clause
hmendozap/auto-sklearn
autosklearn/metalearning/metafeatures/metafeatures.py
1
42900
from collections import defaultdict, OrderedDict, deque import copy import sys import numpy as np import scipy.stats from scipy.linalg import LinAlgError import scipy.sparse import sklearn # TODO use balanced accuracy! import sklearn.metrics import sklearn.cross_validation from sklearn.utils import check_array from sk...
bsd-3-clause
SanPen/GridCal
src/GridCal/Engine/IO/plexos.py
1
31983
# 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 distributed in the hope that...
gpl-3.0
dinos66/termAnalysis
forTateDataset/termAnalysisDynamic.py
1
80493
# -*- coding: utf-8 -*- ''' Create adjacency matrices and analyse terms dynamically ''' print('Create dynamic adjacency matrices and ESOMs') #-------------------------------------------- #run create_Info_Files.py before running this #-------------------------------------------- import pickle, time, igraph, glob, os...
apache-2.0
NuGrid/NuPyCEE
chem_evol.py
1
325358
# coding=utf-8 from __future__ import (division, print_function, absolute_import, unicode_literals) ''' Chemical Evolution - chem_evol.py Functionality ============= This is the superclass inherited by the SYGMA and the OMEGA modules. It provides common functions for initialization and for ...
bsd-3-clause
mdpiper/topoflow
topoflow/components/met_base.py
1
110618
## Does "land_surface_air__latent_heat_flux" make sense? (2/5/13) # Copyright (c) 2001-2014, Scott D. Peckham # # Sep 2014. Fixed sign error in update_bulk_richardson_number(). # Ability to compute separate P_snow and P_rain. # Aug 2014. New CSDMS Standard Names and clean up. # Nov 2013. Con...
mit
florian-f/sklearn
sklearn/tree/tree.py
1
32488
""" This module gathers tree-based methods, including decision, regression and randomized trees. Single and multi-output problems are both handled. """ # Code is originally adapted from MILK: Machine Learning Toolkit # Copyright (C) 2008-2011, Luis Pedro Coelho <luis@luispedro.org> # License: MIT. See COPYING.MIT file...
bsd-3-clause
WangWenjun559/Weiss
summary/sumy/sklearn/grid_search.py
1
34641
""" The :mod:`sklearn.grid_search` includes utilities to fine-tune the parameters of an estimator. """ from __future__ import print_function # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>, # Gael Varoquaux <gael.varoquaux@normalesup.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # ...
apache-2.0
AbsoluteMSTR/isort
test_isort.py
1
78866
# coding: utf-8 """test_isort.py. Tests all major functionality of the isort library Should be ran using py.test by simply running py.test in the isort project directory Copyright (C) 2013 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associ...
mit
CGATOxford/CGATPipelines
CGATPipelines/PipelineWindows.py
1
39870
'''PipelineWindows - Tasks for window based read distribution analysis ====================================================================== Requirements: * bedtools >= 2.21.0 * picardtools >= 1.106 * samtools >= 1.1 * MEDIPS >= 1.15.0 Reference --------- ''' import os import re import collections import pandas i...
mit
madgik/exareme
Exareme-Docker/src/mip-algorithms/THREE_C/threec.py
1
44722
#!/usr/bin/env python from __future__ import print_function from __future__ import division import rpy2.robjects as robjects from rpy2.robjects import pandas2ri import pandas as pd import numpy as np from mipframework import Algorithm, AlgorithmResult, TabularDataResource class ThreeC(Algorithm): def __init__...
mit
iproduct/course-social-robotics
11-dnn-keras/venv/Lib/site-packages/pandas/tests/arithmetic/test_timedelta64.py
1
79354
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. from datetime import datetime, timedelta import numpy as np import pytest from pandas.errors import OutOfBoundsDatetime, PerformanceWarning import pandas as pd from pandas import ( DataFrame, DatetimeIndex, NaT,...
gpl-2.0
meco-group/omg-tools
omgtools/problems/gcodeschedulerproblem.py
1
66507
# This file is part of OMG-tools. # # OMG-tools -- Optimal Motion Generation-tools # Copyright (C) 2016 Ruben Van Parys & Tim Mercy, KU Leuven. # All rights reserved. # # OMG-tools 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...
lgpl-3.0
OpenDrift/opendrift
opendrift/scripts/opendrift_gui.py
1
31046
#!/usr/bin/env python import matplotlib from matplotlib import pyplot as plt if __name__ == '__main__': matplotlib.use('TKAgg') import sys import os from datetime import datetime, timedelta import numpy as np from PIL import ImageTk, Image import tkinter as tk from tkinter import ttk import opendrift from opendr...
gpl-2.0
Giswater/giswater_qgis_plugin
map_tools/draw_profiles.py
1
77823
""" /*************************************************************************** * * * 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...
gpl-3.0
geophysics/mtpy
mtpy/imaging/plotstrike2d.py
1
53768
# -*- coding: utf-8 -*- """ Created on Thu May 30 18:28:24 2013 @author: jpeacock-pr """ #============================================================================== import matplotlib.pyplot as plt import numpy as np import os from matplotlib.ticker import MultipleLocator import mtpy.imaging.mtplottools as mtpl i...
gpl-3.0
3DGenomes/tadbit
_pytadbit/hic_data.py
1
80109
""" December 12, 2014. """ import os from sys import stderr from collections import OrderedDict from warnings import warn from bisect import bisect_right as bisect from cPickle import HIGHEST_PROTOCOL, d...
gpl-3.0
teonlamont/mne-python
mne/fixes.py
2
51461
"""Compatibility fixes for older version of python, numpy and scipy If you add content to this file, please give the version of the package at which the fix is no longer needed. # XXX : originally copied from scikit-learn """ # Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org> # Gael Varoq...
bsd-3-clause
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/tests/frame/test_indexing.py
1
106857
# -*- coding: utf-8 -*- from __future__ import print_function from warnings import catch_warnings from datetime import datetime, date, timedelta, time from pandas.compat import map, zip, range, lrange, lzip, long from pandas import compat from numpy import nan from numpy.random import randn import pytest import nu...
apache-2.0
tlinnet/qNLS
qNLS.py
1
71993
#! /usr/bin/env python ############################################################################### # # # Copyright (C) 2014-2015 Troels E. Linnet, SBiNLab, Copenhagen University # # Copyright (C) 2014-2015 Kaare Teilum, SBiNLab, Copenha...
gpl-3.0
toobaz/pandas
pandas/core/arrays/interval.py
1
39950
from operator import le, lt import textwrap import numpy as np from pandas._config import get_option from pandas._libs.interval import Interval, IntervalMixin, intervals_to_interval_bounds from pandas.compat.numpy import function as nv from pandas.util._decorators import Appender from pandas.core.dtypes.cast import...
bsd-3-clause
sunset1995/HMM
examples/mnist/data_proc.py
1
108931
import os import struct import numpy as np from array import array def read_mnist(): def mnist_file_name(filename): return os.path.join(os.path.dirname(__file__), 'datas', filename) # Read train set labels into numpy (shapes: 60000 x 1) with open(mnist_file_name('train-labels-idx1-ubyte'), 'rb') a...
mit
cpaulik/xray
xray/test/test_dataset.py
1
86929
from copy import copy, deepcopy from textwrap import dedent try: import cPickle as pickle except ImportError: import pickle try: import dask.array as da except ImportError: pass import numpy as np import pandas as pd from xray import (align, concat, conventions, backends, Dataset, DataArray, ...
apache-2.0
percyfal/bokeh
bokeh/core/tests/test_properties.py
1
65154
from __future__ import absolute_import import datetime import unittest import numpy as np import pandas as pd from copy import copy import pytest from bokeh.core.properties import (field, value, NumberSpec, ColorSpec, Bool, Int, Float, Complex, String, Regex, Seq, List, Dict, Tuple, Instance, Any, Interval, ...
bsd-3-clause
ryfeus/lambda-packs
Pandas_numpy/source/pandas/core/indexes/multi.py
1
99726
# pylint: disable=E1101,E1103,W0232 import datetime import warnings from functools import partial from sys import getsizeof import numpy as np from pandas._libs import index as libindex, lib, Timestamp from pandas.compat import range, zip, lrange, lzip, map from pandas.compat.numpy import function as nv from pandas ...
mit
jecki/MetaInductionSim
KommentarSimWindow.py
1
36838
# -*- coding: cp1252 -*- #!/usr/bin/python # Input / Output for the induction simulation #Kommentar zeigt Verlauf an: Step-Nr. ist Schrittnummer #Optionen: # Option 1: import pylab siehe unten. Importiert Schnittstelle mit MatLab # Kurvenzeichnungen # Option 2: Non-MI-Mean-Out siehe unten. Per Default wird Non-MI-Mea...
mit
ctogle/modular
src/modular4/qtgui.py
1
30192
import modular4.base as mb import modular4.mpi as mmpi import os,sys,numpy,matplotlib,six matplotlib.rcParams['backend.qt4'] = 'PySide' matplotlib.rcParams['pdf.fonttype'] = 42 #matplotlib.use('Qt4Agg') from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as figure_canvas from matplotlib.backend_bases impo...
mit
gfyoung/pandas
pandas/tests/io/json/test_pandas.py
1
61704
import datetime from datetime import timedelta from io import StringIO import json import os import sys import numpy as np import pytest from pandas.compat import IS64, PY38, is_platform_windows import pandas.util._test_decorators as td import pandas as pd from pandas import DataFrame, DatetimeIndex, Series, Timesta...
bsd-3-clause
SylvainGuieu/smartplotlib
plotfuncs.py
1
64629
from __future__ import division, absolute_import, print_function from .base import PlotFunc, PlotFactory from .recursive import popargs, KWS, extract_args, alias import matplotlib.pyplot as plt from matplotlib.axis import Axis as pltAxis import numpy as np import os # for savefig __all__ = ["get_axes", "get_figure",...
gpl-2.0
dsm054/pandas
pandas/tests/groupby/test_grouping.py
1
32385
# -*- coding: utf-8 -*- """ test where we are determining what we are grouping, or getting groups """ import pytest from pandas import (date_range, Timestamp, Index, MultiIndex, DataFrame, Series, CategoricalIndex) from pandas.util.testing import (assert_panel_equal, assert_frame_equal, ...
bsd-3-clause
aam-at/tensorflow
tensorflow/python/keras/engine/data_adapter_test.py
1
44238
# 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
jspam/temci
temci/misc/game.py
1
89954
""" Benchmarks game inspired comparison of different implementations for a given language. It doesn't really belong directly to the temci tool, but uses big parts of it. It's currently in a pre alpha state as it's a part of the evaluation for my bachelor thesis that I'm currently doing, """ import temci.utils.util as...
gpl-3.0
henry0312/LightGBM
tests/python_package_test/test_sklearn.py
1
58946
# coding: utf-8 import itertools import math import os import joblib import numpy as np import pytest from pkg_resources import parse_version from sklearn import __version__ as sk_version from sklearn.base import clone from sklearn.datasets import load_svmlight_file, make_multilabel_classification from sklearn.metrics...
mit
toobaz/pandas
pandas/core/indexes/base.py
1
185572
from datetime import datetime, timedelta import operator from textwrap import dedent from typing import Union import warnings import numpy as np from pandas._libs import algos as libalgos, index as libindex, lib import pandas._libs.join as libjoin from pandas._libs.lib import is_datetime_array from pandas._libs.tslib...
bsd-3-clause
boegel/easybuild-easyconfigs
test/easyconfigs/easyconfigs.py
1
65364
## # Copyright 2013-2021 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
dsm054/pandas
pandas/core/reshape/reshape.py
1
35905
# pylint: disable=E1101,E1103 # pylint: disable=W0703,W0622,W0613,W0201 from functools import partial import itertools import numpy as np from pandas._libs import algos as _algos, reshape as _reshape from pandas._libs.sparse import IntIndex from pandas.compat import PY2, range, text_type, u, zip from pandas.core.dty...
bsd-3-clause
linebp/pandas
pandas/tests/test_resample.py
1
127844
# pylint: disable=E1101 from warnings import catch_warnings from datetime import datetime, timedelta from functools import partial from textwrap import dedent import pytz import pytest import dateutil import numpy as np import pandas as pd import pandas.tseries.offsets as offsets import pandas.util.testing as tm fro...
bsd-3-clause
mrocklin/streams
streamz/dataframe/core.py
1
31023
from __future__ import division, print_function import operator from collections import OrderedDict import numpy as np import pandas as pd import toolz from tornado.ioloop import IOLoop from tornado import gen from ..collection import Streaming, _stream_types, OperatorMixin from ..sources import Source from ..utils i...
bsd-3-clause
snorfalorpagus/pywr
tests/test_parameters.py
1
43931
""" Test for individual Parameter classes """ from __future__ import division from pywr.core import Model, Timestep, Scenario, ScenarioIndex, Storage, Link, Input, Output from pywr.parameters import (Parameter, ArrayIndexedParameter, ConstantScenarioParameter, ArrayIndexedScenarioMonthlyFactorsParameter, MonthlyPro...
gpl-3.0
hasecbinusr/pysal
pysal/esda/smoothing.py
1
70252
from __future__ import division """ Apply smoothing to rate computation [Longer Description] Author(s): Myunghwa Hwang mhwang4@gmail.com David Folch dfolch@asu.edu Luc Anselin luc.anselin@asu.edu Serge Rey srey@asu.edu """ __author__ = "Myunghwa Hwang <mhwang4@gmail.com>, David Folch <dfolch@asu.edu...
bsd-3-clause
dpinney/omf
omf/solvers/opendss/__init__.py
1
57511
''' Run OpenDSS and plot the results for arbitrary circuits. ''' import pandas as pd import numpy as np import matplotlib.pyplot as plt import networkx as nx import math import os import warnings try: import opendssdirect as dss except: warnings.warn('opendssdirect not installed; opendss functionality disabled.') fr...
gpl-2.0
debsankha/bedtime-programming
monte_carlo/matplot2.py
1
40118
l0=[14, 124, 156, 262, 326, 392, 444, 478, 488, 524, 560, 598, 610, 624, 658, 676, 690, 690, 698, 706, 710, 716, 738, 762, 762, 774, 776, 784, 806, 800, 814, 830, 826, 836, 846, 848, 856, 868, 872, 880, 896, 898, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 90...
gpl-3.0
the-rccg/instaCompetitionBot
instagramBot.py
1
48346
# -*- coding: utf-8 -*- """ Instagram Competition Automation @author: RCCG pip install git+https://github.com/LevPasha/Instagram-API-python TODOs: [ ] create log, make timing dependent on log since last action was taken, log account name to allow expansion for multiple accounts later on. [ ] split on "bonus...
mit
ocastany/image-cutoff
cutoff.py
1
54528
#!/usr/bin/python3 # encoding: utf-8 """ Read the file "README.md" first... What this program is about... * Spatial spectrum of an image, direct and inverse spatial Fourier transform * RMS value, STD (standard deviation), contrast, sharpness, RMS gradient * Azimuthal average of the spectrum, for studying radial prof...
gpl-2.0
TomAugspurger/pandas
pandas/core/dtypes/dtypes.py
1
39219
""" Define extension dtypes. """ import re from typing import ( TYPE_CHECKING, Any, Dict, List, MutableMapping, Optional, Tuple, Type, Union, cast, ) import numpy as np import pytz from pandas._libs.interval import Interval from pandas._libs.tslibs import NaT, Period, Timestam...
bsd-3-clause
kevin-intel/scikit-learn
sklearn/ensemble/tests/test_forest.py
2
58267
""" Testing for the forest module (sklearn.ensemble.forest). """ # Authors: Gilles Louppe, # Brian Holt, # Andreas Mueller, # Arnaud Joly # License: BSD 3 clause import pickle import math from collections import defaultdict import itertools from itertools import combinations from itertools ...
bsd-3-clause
kmuehlbauer/wradlib
wradlib/zonalstats.py
1
39759
#!/usr/bin/env python # Copyright (c) 2011-2018, wradlib developers. # Distributed under the MIT License. See LICENSE.txt for more info. """ Zonal Statistics ^^^^^^^^^^^^^^^^ This module supports you in computing statistics over spatial zones. A typical application would be to compute mean areal precipitation for a c...
mit
PennyQ/stero_3D_dust_map
maptools.py
1
86731
#!/usr/bin/env python # -*- coding: utf-8 -*- # # maptools.py # # Copyright 2013-2014 Greg Green <greg@greg-UX31A> # # 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 2 of ...
gpl-3.0
BU-hammerTeam/PyHammer
eyecheck.py
1
47837
from pyhamimports import * from gui_utils import * from spectrum import * class Eyecheck(QMainWindow): def __init__(self, specObj, options): super().__init__() # Store Input Variables self.specObj = specObj # The Spectrum object created in the pyhammer script self.options = ...
mit
JulienPeloton/s4cmb
s4cmb/instrument.py
1
39278
#!/usr/bin/python # Copyright (c) 2016-2021 Julien Peloton, Giulio Fabbian. # # This file is part of s4cmb # # 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 #...
gpl-3.0
DGrady/pandas
pandas/core/reshape/merge.py
1
57172
""" SQL-style merge routines """ import copy import warnings import string import numpy as np from pandas.compat import range, lzip, zip, map, filter import pandas.compat as compat from pandas import (Categorical, Series, DataFrame, Index, MultiIndex, Timedelta) from pandas.core.frame import _mer...
bsd-3-clause