repo_name
string
path
string
copies
string
size
string
content
string
license
string
sriki18/scipy
scipy/signal/signaltools.py
2
116009
# Author: Travis Oliphant # 1999 -- 2002 from __future__ import division, print_function, absolute_import import warnings import threading import sys import timeit from . import sigtools, dlti from ._upfirdn import upfirdn, _UpFIRDn, _output_len from scipy._lib.six import callable from scipy._lib._version import Num...
bsd-3-clause
JohanComparat/nbody-npt-functions
bin/bin_DF/test_scripts/fit_density_field_to-tracers.py
1
38029
# cd pySU/pyMultidark/trunk/bin/fortranfile-0.2.1/ import sys import numpy as n import os from os.path import join from astropy.io import fits import time import cPickle from scipy.interpolate import interp1d from scipy.optimize import curve_fit from scipy.stats import scoreatpercentile as sc from scipy.stats import n...
cc0-1.0
magic2du/contact_matrix
Contact_maps/mnist_psuedo_ipython_dl_ppi/code/DL_Mnist_classification_05202015.py
2
34951
# coding: utf-8 # In[1]: # this part imports libs and load data from csv file import sys sys.path.append('../../../libs/') import csv from dateutil import parser from datetime import timedelta from sklearn import svm import numpy as np #import pandas as pd import pickle from sklearn.cross_validation import train_tes...
gpl-2.0
migueldiascosta/pymatgen
pymatgen/electronic_structure/boltztrap.py
1
70140
# coding: utf-8 from __future__ import division, unicode_literals, print_function """ This module provides classes to run and analyze boltztrap on pymatgen band structure objects. Boltztrap is a software interpolating band structures and computing materials properties from this band structure using Boltzmann semi-cla...
mit
florentchandelier/zipline
zipline/testing/fixtures.py
2
56620
from itertools import repeat import os import sqlite3 from unittest import TestCase from contextlib2 import ExitStack from logbook import NullHandler, Logger from six import with_metaclass, iteritems from toolz import flip import pandas as pd import responses from .core import ( create_daily_bar_data, create_...
apache-2.0
ndingwall/scikit-learn
sklearn/ensemble/tests/test_gradient_boosting.py
2
50781
""" Testing for the gradient boosting module (sklearn.ensemble.gradient_boosting). """ import warnings import numpy as np from scipy.sparse import csr_matrix from scipy.sparse import csc_matrix from scipy.sparse import coo_matrix from scipy.special import expit import pytest from sklearn import datasets from sklearn...
bsd-3-clause
awakenting/gif_fitting
fitgif/GIF.py
1
38193
import matplotlib.pyplot as plt from matplotlib import rcParams import numpy as np from numpy.linalg import inv from .ThresholdModel import ThresholdModel from .Filter_Rect_LogSpaced import Filter_Rect_LogSpaced from . import Tools from .Tools import reprint from . import cython_helpers as cyth class GIF(ThresholdMo...
gpl-3.0
BigDataforYou/movie_recommendation_workshop_1
big_data_4_you_demo_1/venv/lib/python2.7/site-packages/pandas/tests/frame/test_indexing.py
1
93610
# -*- coding: utf-8 -*- from __future__ import print_function 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 numpy as np import pandas.core.common as com from pa...
mit
lampcodes/sea_method
shared_lib/shared_funcs.py
1
41213
from numpy import * from pylab import * from datetime import datetime, time, timedelta import numpy as np import console_colors as ccl from scipy.io.netcdf import netcdf_file from ShiftTimes import * import os import matplotlib.patches as patches import matplotlib.transforms as transforms import h5py #from read_NewTab...
gpl-2.0
MJuddBooth/pandas
pandas/tests/reductions/test_reductions.py
1
40127
# -*- coding: utf-8 -*- from datetime import datetime, timedelta import numpy as np import pytest import pandas as pd from pandas import ( Categorical, DataFrame, DatetimeIndex, Index, NaT, Period, PeriodIndex, RangeIndex, Series, Timedelta, TimedeltaIndex, Timestamp, compat, isna, timedelta_range, to_tim...
bsd-3-clause
timothydmorton/VESPA
vespa/fpp.py
1
30387
from __future__ import print_function, division import os, os.path, re import logging from six import string_types try: import cPickle as pickle except ImportError: import pickle try: from configobj import ConfigObj import numpy as np import pandas as pd import matplotlib.pyplot as plt fr...
mit
childresslab/MicrocavityExp1
logic/confocal_logic.py
1
52290
# -*- coding: utf-8 -*- """ This module operates a confocal microsope. Qudi 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. Qudi is distrib...
gpl-3.0
cpcloud/seaborn
seaborn/axisgrid.py
1
34980
from __future__ import division from itertools import product import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt from . import utils from .palettes import color_palette class FacetGrid(object): """Subplot grid for applying plotting functions to subsets of data.""" ...
bsd-3-clause
maxlikely/scikit-learn
sklearn/linear_model/coordinate_descent.py
1
46282
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Gael Varoquaux <gael.varoquaux@inria.fr> # # License: BSD Style. import sys import warnings import itertools import operator from abc import AB...
bsd-3-clause
plotly/plotly.py
packages/python/plotly/plotly/graph_objs/_pie.py
1
82249
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Pie(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "pie" _valid_props = { "automargin", "customdata", "customdatasrc", "directi...
mit
eickenberg/scikit-learn
sklearn/gaussian_process/gaussian_process.py
1
34394
# -*- coding: utf-8 -*- # Author: Vincent Dubourg <vincent.dubourg@gmail.com> # (mostly translation, see implementation details) # Licence: BSD 3 clause from __future__ import print_function import numpy as np from scipy import linalg, optimize, rand from ..base import BaseEstimator, RegressorMixin from ..m...
bsd-3-clause
saiwing-yeung/scikit-learn
sklearn/metrics/classification.py
2
70360
"""Metrics to assess performance on classification task given class prediction Functions named as ``*_score`` return a scalar value to maximize: the higher the better Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize: the lower the better """ # Authors: Alexandre Gramfort <alexandre.gramf...
bsd-3-clause
rnwolf/jira-metrics-extract
jira_metrics_extract/cycletime.py
1
36940
from .query import QueryManager import pandas as pd import numpy as np import os import dateutil.parser import datetime import csv import pytz import tempfile from functools import reduce import sys class StatusTypes: open = 'open' backlog = 'backlog' accepted = 'committed' complete = 'complete' ab...
mit
DTUWindEnergy/BECASWrapper
becas_wrapper/becas_wrapper.py
1
30758
__all__ = ['BECASWrapper'] import os import numpy as np import time import commands import subprocess import matplotlib as mpl import scipy.io.matlab as spio def ksfunc(p, rho=50., side=1.): """ Kreisselmeier and Steinhauser constraint aggregation function params -------- p: 1-d array v...
agpl-3.0
marl/jams
jams/core.py
1
68842
""" Core functionality ------------------ This library provides an interface for reading JAMS into Python, or creating them programatically. .. currentmodule:: jams Function reference ^^^^^^^^^^^^^^^^^^ .. autosummary:: :toctree: generated/ load Object reference ^^^^^^^^^^^^^^^^ .. autosummary:: :toctr...
isc
cowlicks/dask
dask/dataframe/tests/test_io.py
1
50930
import gzip import pandas as pd import numpy as np import pandas.util.testing as tm import sys import os import dask import pytest from distutils.version import LooseVersion from threading import Lock from time import sleep import threading import dask.array as da import dask.dataframe as dd from dask.dataframe.io imp...
bsd-3-clause
tswast/google-cloud-python
bigquery/tests/unit/test_table.py
1
132151
# Copyright 2015 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
EoinTravers/Squeak
squeak/main.py
1
35433
#~ from __future__ import division import os import pandas as pd import numpy as np from scipy import interpolate, interp, stats from math import sqrt import math import warnings ########################### # Normalization functions # ########################### def even_time_steps(x, y, t, length = 101): """Interpo...
gpl-2.0
fboers/jumegX
jumeg_plot.py
1
30229
''' Plotting functions for jumeg. ''' import os import numpy as np import matplotlib.pylab as pl import matplotlib.ticker as ticker import mne from mpl_toolkits.axes_grid import make_axes_locatable from jumeg.jumeg_utils import (get_files_from_list, thresholded_arr, triu_indices) from jum...
bsd-3-clause
e-koch/VLA_Lband
14B-088/HI/analysis/HI_stacking_modeling.py
1
41719
import astropy.units as u from spectral_cube import SpectralCube, OneDSpectrum import numpy as np import matplotlib.pyplot as p from pandas import DataFrame from astropy.io import fits from os.path import join as osjoin import os import seaborn as sb from astropy.utils.console import ProgressBar from cube_analysis.s...
mit
basnijholt/holoviews
holoviews/operation/datashader.py
1
52541
from __future__ import absolute_import, division from collections import Callable, Iterable import warnings import param import numpy as np import pandas as pd import xarray as xr import datashader as ds import datashader.reductions as rd import datashader.transfer_functions as tf import dask.dataframe as dd from par...
bsd-3-clause
cactusbin/nyt
matplotlib/lib/matplotlib/backends/backend_pdf.py
1
91314
# -*- 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: ...
unlicense
jhnnsnk/VIOLA
test_data/topo_brunel_alpha_nest.py
1
39361
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' E-I network connected with NEST topology ---------------------------------------- Simulation of a network consisting of an excitatory and an inhibitory neuron population with distance-dependent connectivity. The code bases on the script brunel_alpha_nest.py which...
gpl-2.0
nanoporetech/pomoxis
pomoxis/catalogue_errors.py
1
46389
import argparse from collections import defaultdict, Counter, namedtuple import concurrent.futures from functools import partial import itertools import logging from operator import attrgetter import os import pickle import re import unittest import warnings import matplotlib; matplotlib.use('Agg', force=True) # enfo...
mpl-2.0
terrencepreilly/darglint
tests/test_parser.py
1
37634
import ast from collections import ( defaultdict, ) from unittest import TestCase, skip from darglint.lex import ( condense, lex, ) from darglint.parse.identifiers import ( ArgumentIdentifier, ExceptionIdentifier, NoqaIdentifier, ) from darglint.parse.google import ( parse, ) from darglint....
mit
colour-science/colour
colour/continuous/tests/test_multi_signal.py
1
33561
# -*- coding: utf-8 -*- """ Defines the unit tests for the :mod:`colour.continuous.multi_signals` module. """ import numpy as np import operator import unittest import re import textwrap from colour.algebra import (CubicSplineInterpolator, Extrapolator, KernelInterpolator) from colour.cons...
bsd-3-clause
MTgeophysics/mtpy
legacy/plot_pt_maps.py
1
36141
""" ================== ModEM ================== # Generate files for ModEM # revised by JP 2017 # revised by AK 2017 to bring across functionality from ak branch """ import os import numpy as np from matplotlib import pyplot as plt, gridspec as gridspec, colorbar as mcb from matplotlib.colors import Normalize from ...
gpl-3.0
anntzer/scikit-learn
sklearn/preprocessing/tests/test_data.py
2
102113
# Authors: # # Giorgio Patrini # # License: BSD 3 clause import warnings import itertools import numpy as np import numpy.linalg as la from scipy import sparse, stats from scipy.sparse import random as sparse_random import pytest from sklearn.utils import gen_batches from sklearn.utils._testing import ass...
bsd-3-clause
nextstrain/augur
augur/filter.py
1
36446
""" Filter and subsample a sequence set. """ from Bio import SeqIO from collections import defaultdict from typing import Collection import random, os, re import pandas as pd import numpy as np import sys import datetime from tempfile import NamedTemporaryFile import treetime.utils from .index import index_sequences ...
agpl-3.0
dimonaks/siman
siman/project_funcs.py
1
186822
# -*- coding: utf-8 -*- #Copyright Aksyonov D.A from __future__ import division, unicode_literals, absolute_import import sys, copy, re, os, shutil #external import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt try: from tabulate import tabulate except: print('projec...
gpl-2.0
lcrobert/PySA
PySA_2.0.1_20180205.py
1
130271
# -*- coding: utf-8 -*- import sys reload(sys) sys.setdefaultencoding('utf-8') import os from PySide import QtCore, QtGui import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg import matplotlib.ticker as tick tick.MultipleLocator(base=25.0) from PIL import Image version = "PyS...
apache-2.0
Djabbz/scikit-learn
sklearn/svm/tests/test_svm.py
1
31664
""" Testing for Support Vector Machine module (sklearn.svm) TODO: remove hard coded numerical results when possible """ import numpy as np import itertools from numpy.testing import assert_array_equal, assert_array_almost_equal from numpy.testing import assert_almost_equal from scipy import sparse from nose.tools im...
bsd-3-clause
plotly/plotly.py
packages/python/plotly/plotly/figure_factory/_facet_grid.py
2
39432
from __future__ import absolute_import from plotly import exceptions, optional_imports import plotly.colors as clrs from plotly.figure_factory import utils from plotly.subplots import make_subplots import math from numbers import Number pd = optional_imports.get_module("pandas") TICK_COLOR = "#969696" AXIS_TITLE_CO...
mit
Azeret/galIMF
galevo.py
1
303295
# A python3 code # This is a single-zone closed-box galaxy chemical evolution module. # It is coupled with a variable galaxy-wide IMF that depends on the galactic property at the time of star formation. # The stellar population forms at every 10 Myr (the shortest time step) over 10 Gyr; # with each stellar population a...
gpl-3.0
vhaasteren/qtip
constants.py
1
435001
#!/usr/bin/python # -*- coding: utf-8 -*- # vim: tabstop=4:softtabstop=4:shiftwidth=4:expandtab """ constants: Some constants, and testing data """ # Do it like this: dict(list(r.items()) + list(s.items())) mpl_rcParams_white = dict({ 'lines.color': 'black', 'patch.edgecolor': 'blue', 'text.color': 'black...
gpl-3.0
QCaudron/SmallPopTSIR
utilities/notebook.py
1
42689
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <headingcell level=1> # Measles in Small Populations # <markdowncell> # Based on *Finkenstadt and Grenfell (2002), Applied Statistics*, the paper introducing the TSIR model. The model relates $S_t$, the number of susceptibles at time $t$, to the number of infecte...
mit
migueldiascosta/pymatgen
pymatgen/io/abinit/flows.py
1
92997
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ A Flow is a container for Works, and works consist of tasks. Flows are the final objects that can be dumped directly to a pickle file on disk Flows are executed using abirun (abipy). """ from __future__ impo...
mit
plotly/python-api
packages/python/plotly/plotly/graph_objs/_scatterternary.py
1
82788
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scatterternary(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "scatterternary" _valid_props = { "a", "asrc", "b", "bsrc", ...
mit
amolkahat/pandas
pandas/tests/indexes/test_category.py
1
47902
# -*- coding: utf-8 -*- import pytest import numpy as np import pandas.util.testing as tm from pandas.core.indexes.api import Index, CategoricalIndex from pandas.core.dtypes.dtypes import CategoricalDtype from pandas._libs import index as libindex from .common import Base from pandas.compat import range, PY3 from p...
bsd-3-clause
Melclic/HMG
py_wrapper/polynomial.py
1
51425
""" Extended functions to operate on polynomials """ # ------------------------------------------------------------------------- # Name: polynomial # Purpose: Functions to operate on polynomials. # # Author: pab # polyXXX functions are based on functions found in the matlab toolbox polyutil # writte...
gpl-3.0
PmagPy/PmagPy
pmagpy/pmag.py
1
503669
import codecs import math import os import string import sys import time from past.utils import old_div import numpy as np from numpy import random from numpy import linalg import pandas as pd from .mapping import map_magic from pmagpy import contribution_builder as cb from . import find_pmag_dir from pmag_env import ...
bsd-3-clause
tony810430/flink
flink-python/pyflink/table/table_environment.py
1
79595
################################################################################ # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this...
apache-2.0
GGiecold/PySCUBA
src/PySCUBA/SCUBA_core.py
1
30539
#!/usr/bin/env python # PySCUBA/src/PySCUBA/SCUBA_core.py # Author: Gregory Giecold for the GC Yuan Lab # Affiliation: Harvard University # Contact: g.giecold@gmail.com; ggiecold@jimmy.harvard.edu from collections import defaultdict from math import exp, floor, sqrt from os import getcwd, path import sys import w...
mit
gingi99/research_dr
python/Experiment/ExperimentsMLEM2.py
1
32826
# coding: utf-8 # python 3.5 from itertools import product from sklearn.metrics import accuracy_score from multiprocessing import Pool from multiprocessing import freeze_support import numpy as np import sys import os sys.path.append(os.path.dirname(os.path.abspath("__file__"))+'/../MLEM2') #sys.path.append('/Users/ook...
mit
MTgeophysics/mtpy
mtpy/imaging/plot_mt_response.py
1
63921
# -*- coding: utf-8 -*- """ ================= plot_mt_response ================= Plots the resistivity and phase for different modes and components Created 2017 @author: jpeacock """ # ============================================================================== import os import numpy as np import matplotlib.pypl...
gpl-3.0
ChinaQuants/pyfolio
pyfolio/plotting.py
1
47651
# # Copyright 2015 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
apache-2.0
v0devil/jltom
datagenerator_py3.py
1
38469
from collections import OrderedDict import json import logging #from pylab import * import numpy as np import pandas as pd import sys import re import os import zipfile import sqlalchemy import shutil import time import datetime import argparse from xml.etree.ElementTree import ElementTree from os.path import basename ...
mit
Weihonghao/ECM
Vpy34/lib/python3.5/site-packages/pandas/tests/indexes/test_base.py
3
78516
# -*- coding: utf-8 -*- import pytest from datetime import datetime, timedelta import pandas.util.testing as tm from pandas.core.indexes.api import Index, MultiIndex from pandas.tests.indexes.common import Base from pandas.compat import (range, lrange, lzip, u, text_type, zip, PY3, PY36) ...
agpl-3.0
hhbyyh/spark
python/pyspark/sql/types.py
1
65920
# # 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
timothyb0912/pylogit
src/pylogit/bootstrap.py
1
40630
# -*- coding: utf-8 -*- """ @author: Timothy Brathwaite @name: Bootstrap Controller @summary: This module provides functions that will control the bootstrapping procedure. """ from __future__ import absolute_import import sys import time import itertools from copy import deepcopy import numpy as...
bsd-3-clause
Luigolas/PyReID
package/post_ranker.py
1
30130
from copy import copy import math import random import cv2 from package.utilities import InitializationError from sklearn.ensemble import RandomForestRegressor, RandomTreesEmbedding from sklearn.semi_supervised import LabelSpreading, LabelPropagation import numpy as np from profilehooks import profile __author__ = 'lu...
mit
vortex-ape/scikit-learn
sklearn/tests/test_multiclass.py
4
30508
import pytest import numpy as np import scipy.sparse as sp from re import escape from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_true from sklearn.utils.testing import as...
bsd-3-clause
SanPen/CopperPlate
Gui/gui.py
1
39199
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'gui.ui' # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_mainWindow(object): def setupUi(self, mainWindow): mainWindow.setO...
gpl-3.0
zoeyangyy/event-extraction
remote/wande-event.py
1
38627
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Time : 2017/11/30 下午12:20 # @Author : Zoe # @File : wande-event.py # @Description : 1. 训练测试集按2017年划分 ok # 2. 抽取batch的方法:只用每次shuffle的时候,training accuracy才高??? # 3. Recall@10 / 换成大类 / testing accuracy = 0.581037 # ...
mit
GuessWhoSamFoo/pandas
pandas/tests/frame/test_constructors.py
1
88609
# -*- coding: utf-8 -*- from __future__ import print_function from datetime import datetime, timedelta import functools import itertools import numpy as np import numpy.ma as ma import pytest from pandas.compat import ( PY3, PY36, OrderedDict, is_platform_little_endian, lmap, long, lrange, lzip, range, zip)...
bsd-3-clause
xuewei4d/scikit-learn
sklearn/tree/_export.py
3
37094
""" This module defines export functions for decision trees. """ # Authors: Gilles Louppe <g.louppe@gmail.com> # Peter Prettenhofer <peter.prettenhofer@gmail.com> # Brian Holt <bdholt1@gmail.com> # Noel Dawe <noel@dawe.me> # Satrajit Gosh <satrajit.ghosh@gmail.com> # Trevor...
bsd-3-clause
toastedcornflakes/scikit-learn
sklearn/linear_model/least_angle.py
1
57267
""" Least Angle Regression algorithm. See the documentation on the Generalized Linear Model for a complete discussion. """ from __future__ import print_function # Author: Fabian Pedregosa <fabian.pedregosa@inria.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux # # License: BSD 3 ...
bsd-3-clause
GuessWhoSamFoo/pandas
pandas/core/arrays/period.py
1
31494
# -*- coding: utf-8 -*- from datetime import timedelta import operator import numpy as np from pandas._libs.tslibs import ( NaT, frequencies as libfrequencies, iNaT, period as libperiod) from pandas._libs.tslibs.fields import isleapyear_arr from pandas._libs.tslibs.period import ( DIFFERENT_FREQ, Incompatible...
bsd-3-clause
grlee77/scipy
scipy/interpolate/interpolate.py
2
99567
__all__ = ['interp1d', 'interp2d', 'lagrange', 'PPoly', 'BPoly', 'NdPPoly', 'RegularGridInterpolator', 'interpn'] import itertools import warnings import numpy as np from numpy import (array, transpose, searchsorted, atleast_1d, atleast_2d, ravel, poly1d, asarray, intp) import scipy.spe...
bsd-3-clause
CollinRooney12/htsprophet
htsprophet/hts.py
1
31238
# -*- coding: utf-8 -*- """ Name: hts.py Author: Collin Rooney Last Updated: 7/18/2017 This script will contain functions for all types of hierarchical modeling approaches. It will use the prophet package as a forecasting tool. The general idea of it is very similar to the hts package in R, but it is a little more spec...
mit
darionyaphet/spark
python/pyspark/sql/functions.py
1
115551
# # 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
alexggmatthews/GPflow_profiling
matplotlib2tikz.py
1
62712
# -*- coding: utf-8 -*- # # Copyright (C) 2010--2014 Nico Schlömer # # This file is part of matplotlib2tikz. # # matplotlib2tikz 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,...
apache-2.0
jmmease/pandas
pandas/tests/frame/test_axis_select_reindex.py
1
41654
# -*- coding: utf-8 -*- from __future__ import print_function import pytest from datetime import datetime from numpy import random import numpy as np from pandas.compat import lrange, lzip, u from pandas import (compat, DataFrame, Series, Index, MultiIndex, date_range, isna) import pandas as pd...
bsd-3-clause
anntzer/scikit-learn
sklearn/datasets/_base.py
2
40994
""" Base IO code for all datasets """ # Copyright (c) 2007 David Cournapeau <cournape@gmail.com> # 2010 Fabian Pedregosa <fabian.pedregosa@inria.fr> # 2010 Olivier Grisel <olivier.grisel@ensta.org> # License: BSD 3 clause import csv import hashlib import os import shutil from collections im...
bsd-3-clause
AbeJones/obspyck-binaries
obspyck.py
1
171277
#!/usr/bin/env python # -*- coding: utf-8 -*- #------------------------------------------------------------------- # Filename: obspyck.py # Purpose: ObsPyck main program # Author: Tobias Megies, Lion Krischer # Email: megies@geophysik.uni-muenchen.de # License: GPLv2 # # Copyright (C) 2010 Tobias Megies, Lion Kr...
gpl-2.0
pkgw/pwkit
pwkit/environments/casa/tasks.py
1
126821
# -*- mode: python; coding: utf-8 -*- # Copyright 2015-2017 Peter Williams <peter@newton.cx> and collaborators. # Licensed under the MIT License. """The way that the official ``casapy`` code is written, it's basically impossible to import its tasks into a straight-Python environment. (Trust me, I've tried.) So, this m...
mit
MMTObservatory/mmtwfs
mmtwfs/zernike.py
1
49140
# Licensed under a 3-clause BSD style license - see LICENSE.rst # coding=utf-8 """ A collection of functions and classes for performing wavefront analysis using Zernike polynomials. Several of these routines were adapted from https://github.com/tvwerkhoven/libtim-py. They have been updated to make them more applicable...
bsd-3-clause
gbrammer/grizli
grizli/prep.py
1
219323
""" Align direct images & make mosaics """ import os import inspect from collections import OrderedDict import glob import traceback import numpy as np import matplotlib.pyplot as plt # conda install shapely # from shapely.geometry.polygon import Polygon import astropy.io.fits as pyfits import astropy.wcs as pywcs ...
mit
mclaughlin6464/pylearn2
pylearn2/training_algorithms/sgd.py
1
48347
""" Stochastic Gradient Descent and related functionality such as learning rate adaptation, momentum, and Polyak averaging. """ from __future__ import division __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow, David Warde-Farley"] __license__ =...
bsd-3-clause
DailyActie/Surrogate-Model
01-codes/scikit-learn-master/sklearn/gaussian_process/kernels.py
1
66380
"""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...
mit
cjayb/mne-python
mne/tests/test_source_estimate.py
1
58484
# -*- coding: utf-8 -*- # # License: BSD (3-clause) from copy import deepcopy import os.path as op import re import numpy as np from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_allclose, assert_equal) import pytest from scipy import sparse from scipy.optimize...
bsd-3-clause
jfnavarro/st_analysis
scripts/align_sections.py
1
32698
#! /usr/bin/env python """ This script aligns a set of Spatial Transcriptomics datasets using the first image as reference. It provides different alignment methods (manual and automatic) and it outputs the aligned images, the aligned counts matrices and the alignment spot coordinates. @Author Jose Fernandez Navarro <...
mit
ee-in/python-api
plotly/graph_objs/graph_objs.py
1
52138
""" graph_objs ========== A module that understands plotly language and can manage the json structures. This module defines two base classes: PlotlyList and PlotlyDict. The former inherits from `list` and the latter inherits from `dict`. and is A third structure, PlotlyTrace, is also considered a base class for all su...
mit
has2k1/plydata
plydata/helper_verbs.py
1
112581
""" Helper verbs """ from .operators import DataOperator from .one_table_verbs import select, group_by __all__ = ['call', 'tally', 'count', 'add_tally', 'add_count', 'arrange_all', 'arrange_at', 'arrange_if', 'create_all', 'create_at', 'create_if', 'group_by_all', 'group_by_at', 'grou...
bsd-3-clause
ryfeus/lambda-packs
H2O/ArchiveH2O/h2o/h2o.py
1
72731
# -*- encoding: utf-8 -*- """ h2o -- module for using H2O services. :copyright: (c) 2016 H2O.ai :license: Apache License Version 2.0 (see LICENSE for details) """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import os import warnings import webbrowser import type...
mit
enigmampc/catalyst
tests/data/test_resample.py
1
33664
# Copyright 2016 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
scidash/sciunit
sciunit/utils.py
1
34388
""" Utility functions for SciUnit. """ import contextlib import functools import hashlib import importlib import inspect import os import pkgutil import re import sys import traceback import unittest.mock import warnings from datetime import datetime from io import StringIO, TextIOWrapper from pathlib import Path from...
mit
toobaz/pandas
pandas/tests/indexes/datetimes/test_tools.py
1
84892
""" test to_datetime """ import calendar from datetime import datetime, time import locale from dateutil.parser import parse from dateutil.tz.tz import tzoffset import numpy as np import pytest import pytz from pandas._libs import tslib from pandas._libs.tslibs import iNaT, parsing from pandas.errors import OutOfBou...
bsd-3-clause
Sixshaman/networkx
networkx/convert_matrix.py
1
33223
"""Functions to convert NetworkX graphs to and from numpy/scipy matrices. The preferred way of converting data to a NetworkX graph is through the graph constuctor. The constructor calls the to_networkx_graph() function which attempts to guess the input type and convert it automatically. Examples -------- Create a 10...
bsd-3-clause
leggitta/mne-python
mne/io/fiff/tests/test_raw.py
1
43370
from __future__ import print_function # Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import os import os.path as op import glob from copy import deepcopy import warnings import itertools as itt import numpy as np ...
bsd-3-clause
jakobkolb/MayaSim
mayasim/original_version/Mayasim_original.py
1
31897
import numpy as np import matplotlib.pyplot as plot # from copy import deepcopy import scipy.ndimage as ndimage import os import datetime debug = False #def main(): ### load the initial variables temp = np.load('0_RES_432x400_temp.npy') temp = temp/12. ### factor 1/12 as in netlogo version precip = np.load('0_RES_...
gpl-3.0
oxpeter/small_fry
degrees.py
1
45544
#!/usr/bin/env python """ This script compares the significant and non-significant genes between two experiments and shows how many are concordant/non-concordant etc. """ import argparse import collections import itertools import os import re import subprocess import sys import pandas as pd import numpy as np import...
gpl-2.0
andrrizzi/yank
Yank/utils.py
1
61383
import os import re import sys import copy import glob import json import shutil import signal import pandas import inspect import logging import itertools import subprocess import collections from contextlib import contextmanager from pkg_resources import resource_filename import mdtraj import parmed import numpy as...
mit
laugustyniak/textlytics
textlytics/sentiment/generate_lexicons_and_results.py
1
31997
# coding: utf-8 import logging import multiprocessing import os import pickle import sys import time from math import sqrt import enchant import numpy as np import codecs import simplejson import pandas as pd from glob import glob from nltk import word_tokenize from nltk.corpus import stopwords from nltk.tokenize impo...
mit
Foorth/panda-bigmon-core
core/views.py
1
437120
import logging, re, json, commands, os, copy from datetime import datetime, timedelta import time import json import copy import itertools, random import string as strm import math from urllib import urlencode from urlparse import urlparse, urlunparse, parse_qs from django.utils.decorators import available_attrs from d...
apache-2.0
zfrenchee/pandas
pandas/tseries/offsets.py
1
79669
# -*- coding: utf-8 -*- from datetime import date, datetime, timedelta import functools import operator from pandas.compat import range from pandas import compat import numpy as np from pandas.core.dtypes.generic import ABCSeries, ABCDatetimeIndex, ABCPeriod from pandas.core.tools.datetimes import to_datetime from pa...
bsd-3-clause
Aegeaner/spark
python/pyspark/sql/tests/test_pandas_udf_scalar.py
1
37248
# # 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
annoviko/pyclustering
pyclustering/cluster/__init__.py
1
34974
"""! @brief pyclustering module for cluster analysis. @authors Andrei Novikov (pyclustering@yandex.ru) @date 2014-2020 @copyright BSD-3-Clause """ import itertools import math import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from mpl_toolkits.mplot3d import Axes3D from pyc...
gpl-3.0
yucelkilic/astrolib
astronomy.py
1
58317
# -*- coding: utf-8 -*- from __future__ import print_function from astropy import coordinates from astropy import units as u from astropy.wcs import WCS from astropy.io import fits from astropy.time import Time from astropy.coordinates import get_body_barycentric from astropy.table import Table, Column from ccdproc i...
gpl-3.0
BryanCutler/spark
python/pyspark/pandas/plot/matplotlib.py
1
30171
# # 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
themrmax/scikit-learn
sklearn/model_selection/tests/test_split.py
2
52934
"""Test the split module""" from __future__ import division import warnings import numpy as np from scipy.sparse import coo_matrix, csc_matrix, csr_matrix from scipy import stats from scipy.misc import comb from itertools import combinations from itertools import combinations_with_replacement from sklearn.utils.testi...
bsd-3-clause
winklerand/pandas
pandas/tests/scalar/test_timedelta.py
1
32039
""" test the scalar Timedelta """ import pytest import numpy as np from datetime import timedelta import pandas as pd import pandas.util.testing as tm from pandas.core.tools.timedeltas import _coerce_scalar_to_timedelta_type as ct from pandas import (Timedelta, TimedeltaIndex, timedelta_range, Series, ...
bsd-3-clause
BiaDarkia/scikit-learn
sklearn/tree/tests/test_tree.py
7
66124
""" Testing for the tree module (sklearn.tree). """ import copy import pickle from functools import partial from itertools import product import struct import numpy as np from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from scipy.sparse import coo_matrix from sklearn.random_projection import s...
bsd-3-clause
rabernat/xray
xarray/tests/test_conventions.py
1
32224
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import contextlib import numpy as np import pandas as pd import pytest import warnings import pytest from xarray import conventions, Variable, Dataset, open_dataset from xarray.core imp...
apache-2.0
pylayers/pylayers
pylayers/gui/editor_select.py
1
63070
#!usr/bin/python # -*- coding: latin1 -*- from __future__ import print_function import os import pdb from PIL 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 matplotlib.widgets i...
mit