repo_name
string
path
string
copies
string
size
string
content
string
license
string
winklerand/pandas
pandas/tests/io/json/test_pandas.py
1
47147
# -*- coding: utf-8 -*- # pylint: disable-msg=W0612,E1101 import pytest from pandas.compat import (range, lrange, StringIO, OrderedDict, is_platform_32bit) import os import numpy as np from pandas import (Series, DataFrame, DatetimeIndex, Timestamp, read_json, compat) from...
bsd-3-clause
nipunbatra/bayespy
bayespy/inference/vmp/nodes/node.py
2
40101
###################################################################### # Copyright (C) 2013-2014 Jaakko Luttinen # # This file is licensed under Version 3.0 of the GNU General Public # License. See LICENSE for a text of the license. ###################################################################### ###############...
gpl-3.0
dssg/wikienergy
disaggregator/build/pandas/pandas/tests/test_graphics.py
1
141393
#!/usr/bin/env python # coding: utf-8 import nose import itertools import os import string from distutils.version import LooseVersion from datetime import datetime, date from pandas import (Series, DataFrame, MultiIndex, PeriodIndex, date_range, bdate_range) from pandas.compat import (range, lran...
mit
dssg/wikienergy
disaggregator/build/pandas/pandas/util/testing.py
1
57096
from __future__ import division # pylint: disable-msg=W0402 import random import re import string import sys import tempfile import warnings import inspect import os import subprocess import locale import unittest import traceback from datetime import datetime from functools import wraps, partial from contextlib impo...
mit
dssg/wikienergy
disaggregator/build/pandas/pandas/io/data.py
1
43370
""" Module contains tools for collecting data from various remote sources """ import warnings import tempfile import datetime as dt import time from collections import defaultdict import numpy as np from pandas.compat import( StringIO, bytes_to_str, range, lmap, zip ) import pandas.compat as compat from pandas...
mit
SKIRT/PTS
core/plot/distribution.py
1
70024
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
agpl-3.0
guangtunbenzhu/BGT-Cosmology
Spectroscopy/energyleveldiagram.py
1
51165
from os.path import isfile, join import datapath import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl mpl.rcParams['font.family'] = 'serif' mpl.rcParams['font.serif'] = 'Times New Roman' mpl.rcParams['text.usetex'] = False def plot_energylevel_diagram(low_state, high_state, title, absorption=Non...
mit
zblz/naima
src/naima/plot.py
1
45097
# Licensed under a 3-clause BSD style license - see LICENSE.rst from functools import partial import astropy.units as u import numpy as np from astropy import log from emcee import autocorr from .extern.interruptible_pool import InterruptiblePool as Pool from .extern.validator import validate_array from .utils import...
bsd-3-clause
cython-testbed/pandas
pandas/core/reshape/reshape.py
1
33446
# pylint: disable=E1101,E1103 # pylint: disable=W0703,W0622,W0613,W0201 from pandas.compat import range, text_type, zip, u, PY2 from pandas import compat from functools import partial import itertools import numpy as np from pandas.core.dtypes.common import ( ensure_platform_int, is_list_like, is_bool_dtype, ...
bsd-3-clause
nicaogr/Style-Transfer
TransformNet2.py
1
35542
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon 3 July The goal of this script is to code the Style Transfer Algorithm Inspired from https://github.com/cysmith/neural-style-tf/blob/master/neural_style.py and https://github.com/leongatys/PytorchNeuralStyleTransfer/blob/master/NeuralStyleTransfer.ipy...
gpl-3.0
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/tests/indexes/datetimes/test_datetime.py
1
32487
import pytest import numpy as np from datetime import date, timedelta, time import dateutil import pandas as pd import pandas.util.testing as tm from pandas.compat import lrange from pandas.compat.numpy import np_datetime64_compat from pandas import (DatetimeIndex, Index, date_range, Series, DataFrame, ...
apache-2.0
chrsrds/scikit-learn
sklearn/decomposition/nmf.py
1
46917
""" Non-negative matrix factorization """ # Author: Vlad Niculae # Lars Buitinck # Mathieu Blondel <mathieu@mblondel.org> # Tom Dupre la Tour # License: BSD 3 clause from math import sqrt import warnings import numbers import time import numpy as np import scipy.sparse as sp from ..base impor...
bsd-3-clause
ptkool/spark
python/pyspark/ml/clustering.py
2
60729
# # 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
meren/anvio
anvio/tables/miscdata.py
1
70864
# -*- coding: utf-8 # pylint: disable=line-too-long """The fancy additioanl data module""" import anvio import anvio.db as db import anvio.tables as t import anvio.utils as utils import anvio.terminal as terminal import anvio.filesnpaths as filesnpaths from anvio.errors import ConfigError, GenesDBError from anvio.ta...
gpl-3.0
architecture-building-systems/CityEnergyAnalyst
cea/optimization/preprocessing/decentralized_buildings_cooling.py
1
37613
""" Operation for decentralized buildings """ import time from math import ceil import numpy as np import pandas as pd from itertools import repeat import cea.config import cea.inputlocator from cea.optimization.master.emissions_model import calc_emissions_Whyr_to_tonCO2yr import cea.technologies.boiler as boiler...
mit
tedunderwood/fiction
variation/versatiletrainer2.py
1
32965
#!/usr/bin/env python3 # versatiletrainer.py # # A significant refactoring of this module # by Ted Underwood # December 2017 # # The goal of the module is to construct predictive # models of corpus *subsets*, in a very flexible way. # This is necessary because my literary-historical # interest in modeling is very rare...
mit
MJuddBooth/pandas
pandas/tests/arithmetic/test_timedelta64.py
1
76774
# -*- coding: utf-8 -*- # Arithmetc 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 NullFrequencyError, PerformanceWarning import pandas as pd from pandas import ( DataFrame, Datet...
bsd-3-clause
akshaykr/oracle_cb
Semibandits.py
1
41428
import numpy as np import Simulators from Util import * import scipy.linalg import sklearn.linear_model from Policy import * import Argmax import pickle """ Module of Semibandit algorithms """ class Semibandit(object): """ Default semibandit learning algorithm. Provides interface for semibandit learning ...
mit
Kate-Willett/HadISDH_Marine_Build
EUSTACE_SST_MAT/gridding_cam.py
1
45215
#!/usr/local/sci/bin/python2.7 #***************************** # # general Python gridding script # # #************************************************************************ ''' Author: Robert Dunn Created: March 2016 Last update: 12 April 2016 Location: /project/hadobs2/hadisdh/marine/PROGS/Build -------------------...
cc0-1.0
dssg/education-highschool-public
hspipeline/pipeline.py
1
49327
import csv import hashlib import io import itertools import json import logging import os import random import re import time import matplotlib.pylab as plt import numpy as np import pandas as pd from sklearn import cross_validation from sklearn import metrics from sklearn.base import TransformerMixin from sklearn.cro...
mit
lgbouma/astrobase
astrobase/checkplot/png.py
1
67514
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # png.py - Waqas Bhatti (wbhatti@astro.princeton.edu) - Feb 2019 # License: MIT - see the LICENSE file for the full text. ''' This contains the implementation of checkplots that generate PNG files only. The `checkplot_png` function takes a single period-finding result an...
mit
MMKrell/pyspace
pySPACE/missions/nodes/classification/base.py
1
89554
""" Base classes for classification """ import numpy # import matplotlib as mpl # mpl.rcParams['text.usetex']=True # mpl.rcParams['text.latex.unicode']=True import matplotlib.pyplot as plt import os import cPickle import logging import math import numpy import os import timeit import warnings # base class from pyS...
gpl-3.0
alekz112/xlwings
xlwings/main.py
1
54587
""" xlwings - Make Excel fly with Python! Homepage and documentation: http://xlwings.org See also: http://zoomeranalytics.com Copyright (C) 2014-2015, Zoomer Analytics LLC. All rights reserved. License: BSD 3-clause (see LICENSE.txt for details) """ import os import sys import re import numbers import itertools impo...
apache-2.0
CGATOxford/CGATPipelines
CGATPipelines/pipeline_peakcalling.py
1
63889
"""========================================================= pipeline_peakcalling - Produce Peaklist from Bam Files ========================================================= Overview ======== The aim of this pipeline is to create peaklists in :term:`bed` files from aligned reads in :term:`bam` files that can then be ...
mit
Ziqi-Li/bknqgis
pandas/pandas/tests/frame/test_analytics.py
2
78789
# -*- coding: utf-8 -*- from __future__ import print_function from datetime import timedelta from distutils.version import LooseVersion import sys import pytest from string import ascii_lowercase from numpy import nan from numpy.random import randn import numpy as np from pandas.compat import lrange, product from p...
gpl-2.0
chadnetzer/numpy-gaurdro
numpy/core/code_generators/ufunc_docstrings.py
2
75295
# Docstrings for generated ufuncs docdict = {} def get(name): return docdict.get(name) def add_newdoc(place, name, doc): docdict['.'.join((place, name))] = doc add_newdoc('numpy.core.umath', 'absolute', """ Calculate the absolute value element-wise. Parameters ---------- x : array_like...
bsd-3-clause
tensorflow/tfx-bsl
tfx_bsl/tfxio/tensor_adapter.py
1
38552
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
josenavas/labman
labman/db/tests/test_process.py
1
112019
# ---------------------------------------------------------------------------- # Copyright (c) 2017-, labman 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
kevin-intel/scikit-learn
sklearn/cluster/tests/test_k_means.py
2
44252
"""Testing for K-means""" import re import sys import numpy as np from scipy import sparse as sp from threadpoolctl import threadpool_limits import pytest from sklearn.utils._testing import assert_array_equal from sklearn.utils._testing import assert_allclose from sklearn.utils.fixes import _astype_copy_false from s...
bsd-3-clause
gwpy/gwpy
gwpy/segments/tests/test_flag.py
3
34726
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2014-2020) # # This file is part of GWpy. # # GWpy 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)...
gpl-3.0
zfrenchee/pandas
pandas/tests/plotting/test_series.py
1
33921
# coding: utf-8 """ Test cases for Series.plot """ from itertools import chain import pytest from datetime import datetime import pandas as pd from pandas import Series, DataFrame, date_range from pandas.compat import range, lrange import pandas.util.testing as tm import pandas.util._test_decorators as td import ...
bsd-3-clause
arborh/tensorflow
tensorflow/python/keras/engine/data_adapter.py
3
38939
# 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
datapythonista/pandas
pandas/core/arrays/datetimes.py
1
82721
from __future__ import annotations from datetime import ( datetime, time, timedelta, tzinfo, ) from typing import ( TYPE_CHECKING, cast, overload, ) import warnings import numpy as np from pandas._libs import ( lib, tslib, ) from pandas._libs.arrays import NDArrayBacked from panda...
bsd-3-clause
r0k3/arctic
tests/integration/store/test_pandas_store.py
1
73876
from six import StringIO from datetime import datetime as dt, timedelta as dtd import itertools import string from dateutil.rrule import rrule, DAILY from mock import Mock, patch from pandas import DataFrame, Series, DatetimeIndex, MultiIndex, read_csv, Panel, date_range, concat from pandas.tseries.offsets import Date...
lgpl-2.1
ajmorss/automatedAFManalysis
dataviewer/dataviewer.py
1
33561
# -*- coding: utf-8 -*- """ Created on Tue Jun 10 15:39:35 2014 @author: Andrew """ from automatedAFManalysis.dataviewer.legacy_interface import Ui_MainWindow from PyQt4 import QtGui, QtCore import numpy as np import automatedAFManalysis.dataviewer.connectdialog as cd from matplotlib.backends.backend_qt4agg import Fi...
cc0-1.0
tensorflow/estimator
tensorflow_estimator/python/estimator/canned/v1/linear_testing_utils_v1.py
1
91108
# Copyright 2017 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
datapythonista/pandas
pandas/core/arrays/categorical.py
1
92402
from __future__ import annotations from csv import QUOTE_NONNUMERIC from functools import partial import operator from shutil import get_terminal_size from typing import ( TYPE_CHECKING, Hashable, Sequence, TypeVar, Union, cast, ) from warnings import ( catch_warnings, simplefilter, ...
bsd-3-clause
kdebrab/pandas
pandas/util/testing.py
1
93773
from __future__ import division # pylint: disable-msg=W0402 import re import string import sys import tempfile import warnings import os import subprocess import locale import traceback from datetime import datetime from functools import wraps from contextlib import contextmanager from numpy.random import randn, ran...
bsd-3-clause
jsilter/scipy
scipy/stats/_distn_infrastructure.py
1
111679
# # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from __future__ import division, print_function, absolute_import from scipy.lib.six import string_types, exec_ import sys import keyword import re import inspect import types import warnings from scipy.misc import...
bsd-3-clause
PanDAWMS/panda-server
pandaserver/jobdispatcher/JobDispatcher.py
1
53119
""" dispatch jobs """ import re import os import sys import json import threading from pandaserver.jobdispatcher import Protocol import time import socket import datetime import traceback from threading import Lock from pandaserver.config import panda_config from pandaserver.dataservice.AdderGen import AdderGen from ...
apache-2.0
jhprinz/openpathsampling
openpathsampling/high_level/network.py
1
34593
import logging import itertools import random import pandas as pd import openpathsampling as paths from openpathsampling.netcdfplus import StorableNamedObject from functools import reduce # not built-in for py3 logger = logging.getLogger(__name__) def index_to_string(index): n_underscore = index // 26 let...
lgpl-2.1
istellartech/OpenTsiolkovsky
bin/OpenTsiolkovsky.py
1
90227
# -*- coding: utf8 -*- import sys import os import tkinter as tk import tkinter.ttk as ttk import tkinter.messagebox as tkmsg import tkinter.filedialog as tkfd import json import pandas as pd import subprocess import matplotlib matplotlib.use("TkAgg") from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, N...
mit
Pragmatismo/Pigrow
scripts/gui/pigrow_remote.py
1
785193
#!/usr/bin/python3 # # WORK IN PROGRESS # # Classes already created; # -app pannels # pi_link_pnl - top-left connection box with ip, username, pass # view_pnl - allows you to select which options to view # # -main pannels # system_info_pnl - for setting up the raspberry pi system and pig...
gpl-3.0
Didou09/tofu
tofu/data/_core.py
1
174837
# -*- coding: utf-8 -*- # Built-in import sys import os import itertools as itt import copy import warnings from abc import ABCMeta, abstractmethod import inspect # Common import numpy as np import scipy.interpolate as scpinterp import matplotlib.pyplot as plt from matplotlib.tri import Triangulation as mplTri # to...
mit
Guokr1991/POCS
panoptes/environment/AAGCloudSensor.py
1
38222
#!/usr/bin/env python import datetime import os import sys import serial import re import time import argparse import math import numpy as np import astropy.units as u from ..utils.logger import has_logger @has_logger class AAGCloudSensor(object): ''' This class is for the AAG Cloud Sensor device which ca...
mit
GillesPy/gillespy
gillespy/gillespy.py
1
52190
""" A simple toolkit for creating and simulating discrete stochastic models in python. This serves primarily as a python wrapper for the C-based solvers within StochKit2. The gillespy.Model class provides nearly all of the functionality present in this project. This version is updated (4/2017) to contain documentat...
gpl-3.0
rs2/pandas
pandas/core/window/rolling.py
1
70941
""" Provide a generic structure to support window functions, similar to how we have a Groupby object. """ from datetime import timedelta from functools import partial import inspect from textwrap import dedent from typing import ( TYPE_CHECKING, Callable, Dict, List, Optional, Set, Tuple, ...
bsd-3-clause
Kirubaharan/hydrology
ch_591/ch_591_daily.py
2
42495
__author__ = 'kiruba' import numpy as np import matplotlib.pyplot as plt import pandas as pd import itertools from spread import spread from scipy.optimize import curve_fit import math from matplotlib import rc import email.utils as eutils import time import datetime from datetime import timedelta import scipy as sp i...
gpl-3.0
ytsapras/robonet_site
events/views.py
1
123308
from django.shortcuts import render, get_object_or_404, redirect from django.conf import settings from django.views.decorators.http import require_http_methods from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth import update_session_auth_hash from djan...
gpl-2.0
vascotenner/holoviews
holoviews/core/ndmapping.py
1
32263
""" Supplies MultiDimensionalMapping and NdMapping which are multi-dimensional map types. The former class only allows indexing whereas the latter also enables slicing over multiple dimension ranges. """ from itertools import cycle from operator import itemgetter import numpy as np import param from . import util fr...
bsd-3-clause
bnaul/scikit-learn
sklearn/model_selection/tests/test_search.py
1
77061
"""Test the search module""" from collections.abc import Iterable, Sized from io import StringIO from itertools import chain, product from functools import partial import pickle import sys from types import GeneratorType import re import numpy as np import scipy.sparse as sp import pytest from sklearn.utils._testing...
bsd-3-clause
HBNLdev/DataStore
picker/EEGdata.py
1
35739
'''reading and handling EEG data ''' import os, sys from collections import OrderedDict import h5py import numpy as np import pandas as pd from bokeh.palettes import brewer from scipy.signal import argrelextrema try: from db.utils.filename_parsing import parse_filename except: sys.path.append( os.path.join(o...
gpl-3.0
dhruve/spark
python/pyspark/sql/tests.py
1
116410
# -*- encoding: utf-8 -*- # # 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 ...
apache-2.0
phievo/phievo
phievo/AnalysisTools/Simulation.py
1
35988
import pickle import shelve import glob,os,sys import re from phievo.AnalysisTools import main_functions as MF from phievo.AnalysisTools import palette import matplotlib.pyplot as plt import matplotlib.colors as mcolors import matplotlib.patches as mpatches from matplotlib.lines import Line2D import numpy as np impor...
lgpl-3.0
h2oai/h2o-dev
h2o-py/tests/pyunit_utils/utilsPY.py
1
218579
from __future__ import print_function from future import standard_library standard_library.install_aliases() from builtins import range from past.builtins import basestring from functools import reduce from scipy.sparse import csr_matrix import sys, os import pandas as pd from six import string_types try: # wor...
apache-2.0
mistercrunch/panoramix
superset/db_engine_specs/presto.py
2
48425
# 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
yuxiang-zhou/menpo
menpo/visualize/base.py
1
56563
from collections import Iterable import numpy as np from menpo.base import MenpoMissingDependencyError class Menpo3dMissingError(MenpoMissingDependencyError): r""" Exception that is thrown when an attempt is made to import a 3D visualisation method, but 'menpo3d' is not installed. """ def __init_...
bsd-3-clause
kgullikson88/General
CCF_Systematics.py
1
37468
import os import re from collections import defaultdict from operator import itemgetter import logging import sys import pandas as pd from scipy.interpolate import InterpolatedUnivariateSpline as spline from scipy.integrate import quad from scipy.optimize import minimize_scalar, fmin from george import kernels import ...
gpl-3.0
sniemi/SamPy
focus/FocusPlots.py
1
57290
""" Creates few different plots from the focus data. HISTORY: Created on Sep 10, 2009 Added to the repository on Dec 3, 2010 :author: Sami-Matias Niemi :todo: 1) change focus trend since mirror move to two x axis mode (one with date) 2) Create a new plot: all focus data since last mirror move, fit functions "...
bsd-2-clause
sniemi/SamPy
bolshoi/generateTestPlotsSQLite.py
1
31186
''' This script can be used to generate some basic plots from Rachel's SAM. In these plots comparisons to observational constrains are also performed. :author : Sami-Matias Niemi :contact : niemi@stsci.edu ''' import matplotlib matplotlib.rc('text', usetex=True) matplotlib.rc('xtick', labelsize=12) matplotlib.rc('axe...
bsd-2-clause
GuessWhoSamFoo/pandas
pandas/util/testing.py
1
104417
from __future__ import division from contextlib import contextmanager from datetime import datetime from functools import wraps import locale import os import re from shutil import rmtree import string import subprocess import sys import tempfile import traceback import warnings import numpy as np from numpy.random i...
bsd-3-clause
guangtunbenzhu/BGT-Cosmology
Examples/LRG-MgII/Sigma_MonteCarlo_saturated.py
1
47529
""" Sigma_MonteCarlo """ import numpy as np from scipy import interpolate import halomodel as hm import matplotlib.pyplot as plt from matplotlib import rc, rcParams rc('text', usetex=True) rcParams['text.latex.preamble']=[r"\usepackage{amsmath}"] CosPar={'Omega_M':0.3, 'Omega_L':0.7, 'Omega_b':0.045, 'Omega_nu':1e-5,...
mit
peterfpeterson/mantid
Framework/PythonInterface/mantid/simpleapi.py
3
53905
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ ...
gpl-3.0
low-sky/spectral-cube
spectral_cube/spectral_cube.py
1
166474
""" A class to represent a 3-d position-position-velocity spectral cube. """ from __future__ import print_function, absolute_import, division import warnings from functools import wraps import operator import re import itertools import copy import tempfile import textwrap from pathlib import PosixPath import six from...
bsd-3-clause
kambysese/mne-python
mne/viz/tests/test_3d.py
1
36089
# 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> # Mainak Jas <mainak@neuro.hut.fi> # Mark Wronkiewicz <wronk.mark@gmail.com> # # Lice...
bsd-3-clause
markchil/gptools
gptools/gaussian_process.py
1
124441
# Copyright 2014 Mark Chilenski # This program is distributed under the terms of the GNU General Purpose License (GPL). # Refer to http://www.gnu.org/licenses/gpl.txt # # 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 Fr...
gpl-3.0
tkcroat/Augerquant
Modules/Auger_smdifquant_functions.py
1
50700
# -*- coding: utf-8 -*- """ Created on Tue May 3 14:11:09 2016 Contains all functions related to peak finding in smooth-differentiated Auger spectra (which are called by Auger_quant_batch.py) findindices - takes user's list of desired elements and background regions, checks each spe file and returns ideal posit...
mit
Delosari/dazer
bin/lib/Astro_Libraries/spectrum_fitting/gasEmission_functions.py
1
30795
import numpy as np import pyneb as pn from os import path from pandas import read_excel from bisect import bisect_left from scipy.optimize import curve_fit from DZ_LineMesurer import LineMesurer_v2 from numpy import ones, exp, zeros, log10 from tensor_tools import EmissivitySurfaceFitter_tensorOps, EmissionEquations_te...
mit
GuessWhoSamFoo/pandas
pandas/core/arrays/categorical.py
1
92616
# pylint: disable=E1101,W0232 import textwrap from warnings import warn import numpy as np from pandas._libs import algos as libalgos, lib import pandas.compat as compat from pandas.compat import lzip, u from pandas.compat.numpy import function as nv from pandas.util._decorators import ( Appender, Substitution, ...
bsd-3-clause
legacysurvey/legacypipe
py/legacypipe/survey.py
1
61862
from __future__ import print_function import os import tempfile import numpy as np import fitsio from astrometry.util.fits import fits_table, merge_tables from astrometry.util.file import trymakedirs from tractor.ellipses import EllipseESoft, EllipseE from tractor.galaxy import ExpGalaxy from tractor import PointS...
bsd-3-clause
jenshnielsen/basemap
lib/mpl_toolkits/basemap/__init__.py
1
252850
""" Module for plotting data on maps with matplotlib. Contains the :class:`Basemap` class (which does most of the heavy lifting), and the following functions: :func:`interp`: bilinear interpolation between rectilinear grids. :func:`maskoceans`: mask 'wet' points of an input array. :func:`shiftgrid`: shifts globa...
gpl-2.0
chenhh/PySPPortfolio
PySPPortfolio/pysp_portfolio/exp_analysis.py
1
64902
# -*- coding: utf-8 -*- """ Authors: Hung-Hsin Chen <chenhh@par.cse.nsysu.edu.tw> License: GPL v2 """ import os from datetime import date from time import time import numpy as np import pandas as pd import scipy.stats as spstats import statsmodels.stats.stattools as stat_tools import statsmodels.tsa.stattools as tsa_t...
gpl-3.0
Erotemic/ibeis
ibeis/scripts/postdoc.py
1
115206
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # NOQA import plottool_ibeis as pt import utool as ut from ibeis.algo.verif import vsone from ibeis.scripts._thesis_helpers import DBInputs from ibeis.scripts.thesis import Sampler # NOQA from ibeis.scripts._the...
apache-2.0
vthorsteinsson/tensor2tensor
tensor2tensor/data_generators/text_encoder.py
1
36105
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # 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...
apache-2.0
andrejzadnik/programmable-optic-sensor-gui
src/Programmer.py
1
74135
''' 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 program is distributed in the hope that it will be use...
gpl-3.0
epifanio/ecoop
cf.py
1
34609
#!/usr/bin/python ############################################################################### # # # Project: ECOOP, sponsored by The National Science Foundation # Purpose: this code is part of the Cyberinfrastructure developed for the ECOOP project # http://tw.rpi.edu/web/project/ECOOP # ...
lgpl-3.0
jimmycallin/master-thesis
architectures/conll16st-hd-sdp/sup_parser_v2_hierarchy_ext.py
1
39305
#!/usr/bin/env python # -*- coding: utf-8 -*- """Sample Discourse Relation Classifier Train Train parser for suplementary evaluation Train should take three arguments $inputDataset = the folder of the dataset to parse. The folder structure is the same as in the tar file $inputDataset/parses.json $inputDataset...
mit
quantopian/zipline
zipline/pipeline/engine.py
1
36469
""" Computation engines for executing Pipelines. This module defines the core computation algorithms for executing Pipelines. The primary entrypoint of this file is SimplePipelineEngine.run_pipeline, which implements the following algorithm for executing pipelines: 1. Determine the domain of the pipeline. The domain...
apache-2.0
DSSG-paratransit/main_repo
System_Recovery/core/all_functions.py
1
36784
import pandas as pd import numpy as np import haversine import operator import math import os import requests import sys import re import time import datetime import read_fwf import itertools import operator import add_TimeWindowsCapacity as aTWC import checkCapacityInsertPts as checkCap from boto.s3.connection import ...
agpl-3.0
gdementen/larray
larray/core/array.py
2
338179
# -*- coding: utf8 -*- from __future__ import absolute_import, division, print_function """ Array class """ # ? implement multi group in one axis getitem: lipro['P01,P02;P05'] <=> (lipro['P01,P02'], lipro['P05']) # * we need an API to get to the "next" label. Sometimes, we want to use label+1, but that is problemati...
gpl-3.0
jmmease/pandas
pandas/core/panel.py
1
56761
""" Contains data structures designed for manipulating panel (3-dimensional) data """ # pylint: disable=E1103,W0231,W0212,W0621 from __future__ import division import numpy as np import warnings from pandas.core.dtypes.cast import ( infer_dtype_from_scalar, cast_scalar_to_array, maybe_cast_item) from panda...
bsd-3-clause
GoogleCloudPlatform/ml-pipeline-generator-python
ml_pipeline_gen/models.py
1
30601
# python3 # Copyright 2020 Google Inc. 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 applicab...
apache-2.0
VirusTotal/msticpy
msticpy/sectools/vtlookup.py
1
30161
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ Module...
mit
michalkurka/h2o-3
h2o-py/h2o/sklearn/wrapper.py
2
36985
""" Provides all the logic to construct the `sklearn` wrappers from standard H2O estimators or transformers. The only requirements from the original estimator are the following: - it must have a `train` method (equivalent of `sklearn` `fit` method). - `train` must accept `h2o.H2OFrame` as `training_frame` param. ""...
apache-2.0
zfrenchee/pandas
pandas/io/sql.py
1
58747
# -*- coding: utf-8 -*- """ Collection of query wrappers / abstractions to both facilitate data retrieval and to reduce dependency on DB-specific API. """ from __future__ import print_function, division from datetime import datetime, date, time import warnings import re import numpy as np import pandas._libs.lib as ...
bsd-3-clause
anntzer/seaborn
seaborn/palettes.py
1
33495
import colorsys from itertools import cycle import numpy as np import matplotlib as mpl from .external import husl from .utils import desaturate, set_hls_values, get_color_cycle from .colors import xkcd_rgb, crayons __all__ = ["color_palette", "hls_palette", "husl_palette", "mpl_palette", "dark_palette"...
bsd-3-clause
toobaz/pandas
pandas/tests/frame/test_analytics.py
1
95373
from datetime import timedelta import operator from string import ascii_lowercase import warnings import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import ( Categorical, DataFrame, MultiIndex, Series, Timestamp, date_range, isna, ...
bsd-3-clause
rabipanda/tensorflow
tensorflow/contrib/metrics/python/ops/metric_ops.py
3
154394
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
cbertinato/pandas
pandas/tests/tseries/offsets/test_offsets.py
1
131811
from datetime import date, datetime, timedelta from distutils.version import LooseVersion import numpy as np import pytest from pandas._libs.tslibs import ( NaT, OutOfBoundsDatetime, Timestamp, conversion, timezones) from pandas._libs.tslibs.frequencies import ( INVALID_FREQ_ERR_MSG, get_freq_code, get_freq_s...
bsd-3-clause
mrshu/scikit-learn
sklearn/gaussian_process/gaussian_process.py
1
34491
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: Vincent Dubourg <vincent.dubourg@gmail.com> # (mostly translation, see implementation details) # License: BSD style import numpy as np from scipy import linalg, optimize, rand from ..base import BaseEstimator, RegressorMixin from ..metrics.pairwise import m...
bsd-3-clause
aburgasser/splat
splat/model.py
1
233259
from __future__ import print_function, division """ .. note:: These are the spectral modeling functions for SPLAT """ # imports: internal import bz2 import copy import glob import gzip import os import requests import shutil import sys import time # imports: external #import corner import matplotlib; matplo...
mit
jmmease/pandas
pandas/core/indexes/base.py
1
143970
import datetime import warnings import operator import numpy as np from pandas._libs import (lib, index as libindex, tslib as libts, algos as libalgos, join as libjoin, Timestamp, Timedelta, ) from pandas._libs.lib import is_datetime_array from pandas._libs.tslibs im...
bsd-3-clause
danielhrisca/asammdf
test/test_mdf.py
1
42967
#!/usr/bin/env python from io import BytesIO from pathlib import Path import random import tempfile import unittest import urllib import urllib.request from zipfile import ZipFile import numexpr import numpy as np from pandas import DataFrame from asammdf import MDF, Signal, SUPPORTED_VERSIONS from asammdf.blocks.uti...
lgpl-3.0
pizzathief/scipy
scipy/interpolate/_fitpack_impl.py
2
46653
""" fitpack (dierckx in netlib) --- A Python-C wrapper to FITPACK (by P. Dierckx). FITPACK is a collection of FORTRAN programs for curve and surface fitting with splines and tensor product splines. See https://web.archive.org/web/20010524124604/http://www.cs.kuleuven.ac.be:80/cwis/research/nalag/resea...
bsd-3-clause
robert-digit/superset
superset/data/__init__.py
1
33434
"""Loads datasets, dashboards and slices in a new superset instance""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import gzip import json import os import textwrap import datetime import random import pandas as p...
apache-2.0
gbrammer/unicorn
reduce_scripts.py
2
139789
""" reduce_scripts.py Reduction scripts for all fields starting with the v4.0 catalogs and images. Previously versions of these scripts resided in reduce.py. """ import os import glob import shutil import time import numpy as np import matplotlib.pyplot as plt USE_PLOT_GUI = False import pyfits import time i...
mit
ContinuumIO/blaze
blaze/compute/sql.py
3
49986
""" >>> from blaze import * >>> accounts = symbol('accounts', 'var * {name: string, amount: int}') >>> deadbeats = accounts[accounts['amount'] < 0]['name'] >>> from sqlalchemy import Table, Column, MetaData, Integer, String >>> t = Table('accounts', MetaData(), ... Column('name', String, primary_key = True...
bsd-3-clause
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/tests/io/test_excel.py
1
98903
# pylint: disable=E1101 import functools import operator import os import sys import warnings from datetime import datetime, date, time from distutils.version import LooseVersion from functools import partial from warnings import catch_warnings import numpy as np import pytest from numpy import nan import moto import...
apache-2.0
saimn/glue
glue/core/roi.py
1
35257
from __future__ import absolute_import, division, print_function import copy import numpy as np from matplotlib.patches import Ellipse, Polygon, Rectangle, Path as MplPath, PathPatch from matplotlib.transforms import IdentityTransform, blended_transform_factory from glue.core.exceptions import UndefinedROI from glue...
bsd-3-clause
holtgrewe/OptiType
hlatyper.py
1
37739
import pandas as pd import numpy as np import re import pylab import warnings from collections import OrderedDict from datetime import datetime import sys try: import pysam PYSAM_AVAILABLE = True except ImportError: PYSAM_AVAILABLE = False VERBOSE = False def now(start=datetime.now()): # function arg...
bsd-3-clause