repo_name
string
path
string
copies
string
size
string
content
string
license
string
wbinventor/openmc
openmc/tallies.py
1
125001
from collections.abc import Iterable, MutableSequence import copy import re from functools import partial, reduce from itertools import product from numbers import Integral, Real import operator from pathlib import Path import warnings from xml.etree import ElementTree as ET import numpy as np import pandas as pd impo...
mit
eickenberg/scikit-learn
sklearn/metrics/tests/test_common.py
1
41322
from __future__ import division, print_function import numpy as np from functools import partial from itertools import product from sklearn.datasets import make_multilabel_classification from sklearn.preprocessing import LabelBinarizer, MultiLabelBinarizer from sklearn.utils.multiclass import type_of_target from skle...
bsd-3-clause
CoucheLimite/LifetimeSpectroscopy
IDLSanalyzer_dpss.py
1
51278
import numpy as np import sys import os import time as tm from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog, QListWidgetItem, QLineEdit, QLabel, QRadioButton, QGridLayout, QPushButton, QAction, QActionGroup, QMenu, QInputDialog, qApp, QVBoxLayout from PyQt5 import QtGui, QtWidgets from PyQt5.QtCo...
mit
JoshuaW1990/bus_arrival_prediction
implementation/baseline.py
1
30823
""" Calculate and assess the estimated arrival time with different baseline algorithm """ # import modules import pandas as pd import os from datetime import timedelta, datetime ################################################################################################################# # help...
mit
pratapvardhan/pandas
pandas/tseries/offsets.py
1
78953
# -*- 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 ABCPeriod from pandas.core.tools.datetimes import to_datetime import pandas.core.common as com # ...
bsd-3-clause
CGATOxford/CGATPipelines
obsolete/pipeline_metagenomecommunities.py
1
81942
""" ===================================================== Community analysis of metgenomic shotgun sequencing ===================================================== Pipeline_metagenomecommunities.py takes as input a set of fastq files from a shotgun sequencing experiment of environmental samples and assesses community...
mit
uber/ludwig
tests/integration_tests/test_visualization.py
1
70179
# -*- coding: utf-8 -*- # Copyright (c) 2019 Uber Technologies, 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 ...
apache-2.0
bamueh/dark-matter
dark/proteins.py
1
36429
from __future__ import division, print_function import os import re from os.path import dirname, join from operator import itemgetter from six.moves.urllib.parse import quote import numpy as np from textwrap import fill from collections import Counter import matplotlib matplotlib.use('PDF') import matplotlib.pyplot a...
mit
cacraig/wxDataGetters
wxdatagetters/objects/coltbls.py
1
32875
#!/usr/bin/python # Working script to generate maps from wrfout netCDF files # using matplot lib with basemap # Basemap coding from David John Gagne II # Written by Luke Madaus for use with operational WRF domains from matplotlib.colors import LinearSegmentedColormap def RdBufloat(valrange): # Will define ...
mit
cbertinato/pandas
pandas/tests/generic/test_generic.py
1
32142
from copy import copy, deepcopy import numpy as np import pytest from pandas.core.dtypes.common import is_scalar import pandas as pd from pandas import DataFrame, MultiIndex, Series, date_range import pandas.util.testing as tm from pandas.util.testing import assert_frame_equal, assert_series_equal # ---------------...
bsd-3-clause
pylayers/pylayers
pylayers/mobility/ban/body.py
1
97549
# -*- coding:Utf-8 -*- """ Body Class =========== This class implements the body model .. autoclass:: Body :members: Cylinder Class ============== .. autoclass:: Cylinder :members: """ #import mayavi.mlab as mlab import os import sys import copy import numpy as np import scipy.stats as sp if sys.version...
mit
LCAV/linvpy
linvpy.py
1
38909
from __future__ import division import numpy as np __author__ = 'GuillaumeBeaud' # Abstract class for loss functions so they share the same interface and all # have the rho, psi, weights functions class LossFunction: def __init__(self, clipping=None): # Constructor of the class if clipping is not None:...
bsd-2-clause
boomsbloom/dtm-fmri
DTM/for_gensim/lib/python2.7/site-packages/matplotlib/lines.py
1
50416
""" This module contains all the 2D line class which can draw with a variety of line styles, markers and colors. """ # TODO: expose cap and join style attrs from __future__ import (absolute_import, division, print_function, unicode_literals) from matplotlib.externals import six import warning...
mit
credp/lisa
lisa/stats.py
1
44603
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2020, Arm Limited and contributors. # # 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 # # ...
apache-2.0
CODEJIN/HNet_on_Tensorflow
HNet_GUI.py
1
278841
############################################################################### # HNet GUI # Copyright (C) 2016-2017 Heejo You # # 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 versi...
apache-2.0
cython-testbed/pandas
pandas/tests/test_base.py
1
46347
# -*- coding: utf-8 -*- from __future__ import print_function import re import sys from datetime import datetime, timedelta import pytest import numpy as np import pandas as pd import pandas.compat as compat from pandas.core.dtypes.common import ( is_object_dtype, is_datetimetz, is_datetime64_dtype, needs_i8_...
bsd-3-clause
teoliphant/numpy-refactor
numpy/linalg/linalg.py
1
60661
"""Lite version of scipy.linalg. Notes ----- This module is a lite version of the linalg.py module in SciPy which contains high-level Python interface to the LAPACK library. The lite version only accesses the following LAPACK functions: dgesv, zgesv, dgeev, zgeev, dgesdd, zgesdd, dgelsd, zgelsd, dsyevd, zheevd, dgetr...
bsd-3-clause
bluerover/6lbr
examples/6lbr/test/postprocessing/pp_plot_smartbridgeauto.py
1
44000
from pylab import * import re import math import inspect from pp_utils import * def scatterplot_SmartBridgeAuto_separate(results): print "scatterplot_SmartBridgeAuto_separate" data = {} #dictionary data['Sxxxx']['delay'] = {'x':[], 'y',[]} results = sorted(results, key=lambda k: k.topology) nc...
bsd-3-clause
GuessWhoSamFoo/pandas
pandas/io/json/json.py
1
33657
# pylint: disable-msg=E1101,W0613,W0603 from itertools import islice import os import numpy as np import pandas._libs.json as json from pandas._libs.tslibs import iNaT from pandas.compat import StringIO, long, to_str, u from pandas.errors import AbstractMethodError from pandas.core.dtypes.common import is_period_dty...
bsd-3-clause
BryanCutler/spark
python/pyspark/pandas/base.py
1
72312
# # 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
Winand/pandas
pandas/tests/reshape/test_merge.py
1
64631
# pylint: disable=E1103 import pytest from datetime import datetime, date from numpy.random import randn from numpy import nan import numpy as np import random import pandas as pd from pandas.compat import lrange, lzip from pandas.core.reshape.concat import concat from pandas.core.reshape.merge import merge, MergeErr...
bsd-3-clause
rhiever/tpot
tests/tpot_tests.py
1
82897
# -*- coding: utf-8 -*- """This file is part of the TPOT library. TPOT was primarily developed at the University of Pennsylvania by: - Randal S. Olson (rso@randalolson.com) - Weixuan Fu (weixuanf@upenn.edu) - Daniel Angell (dpa34@drexel.edu) - and many more generous open source contributors TPOT is f...
lgpl-3.0
Quantipy/quantipy
quantipy/core/view_generators/view_specs.py
1
40824
import pandas as pd from quantipy.core.tools.qp_decorators import modify from collections import OrderedDict from itertools import chain from operator import add, sub, mul, div import re import warnings class ViewManager(object): def __init__(self, stack): self.stack = stack self.basics = None ...
mit
cbertinato/pandas
pandas/tests/arithmetic/test_period.py
1
47073
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. # Specifically for Period dtype import operator import numpy as np import pytest from pandas._libs.tslibs.period import IncompatibleFrequency from pandas.errors import PerformanceWarning import pandas as pd from pandas impo...
bsd-3-clause
BoldingBruggeman/gotm
gui.py/xmlplot/common.py
1
59700
#$Id: common.py,v 1.49 2010-12-29 12:13:04 jorn Exp $ # Import modules from standard Python library import sys,os.path,UserDict,re,xml.dom.minidom,datetime # Import additional third party modules import numpy import xmlstore.xmlstore def get_py2exe_datafiles(): from distutils.filelist import findall def add...
gpl-2.0
ChyLau/weviation
weviation/old/notebook_icon.py
1
57877
import wx import methods import parse as p import numpy as np import matplotlib from matplotlib.figure import Figure from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas from matplotlib import cm class TabTorenbeek(wx.ScrolledWindow): def __init__(self, parent): """""" wx...
gpl-2.0
LeiDai/meep_metamaterials
meep_utils_tmp.py
1
37407
#!/usr/bin/env python #coding:utf8 """ Here you can find various functions and classes that facilitate the work with python-meep. I believe some of these functions ought to be implemented in the meep module. Filip Dominec 2012-2013 """ import numpy as np import os, os.path, sys, subprocess, time from scipy.constants i...
mit
chrisbarber/dask
dask/utils.py
1
30069
from __future__ import absolute_import, division, print_function import codecs import functools import inspect import io import math import os import re import shutil import struct import sys import tempfile from errno import ENOENT from collections import Iterator from contextlib import contextmanager from importlib ...
bsd-3-clause
idaholab/raven
framework/Models/Code.py
1
48291
# Copyright 2017 Battelle Energy Alliance, 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 t...
apache-2.0
azjps/bokeh
bokeh/core/tests/test_properties.py
1
61077
from __future__ import absolute_import import datetime import unittest import numpy as np import pandas as pd from copy import copy from bokeh.core.properties import ( HasProps, NumberSpec, ColorSpec, Bool, Int, Float, Complex, String, Regex, Seq, List, Dict, Tuple, Array, Instance, Any, Interval, Either, ...
bsd-3-clause
CCS-Lab/hBayesDM
Python/hbayesdm/base.py
1
32878
import multiprocessing import os import pickle import tempfile import warnings from abc import ABCMeta, abstractmethod from collections import OrderedDict from pathlib import Path from typing import Any, Callable, Dict, List, Sequence, Tuple, Union import arviz as az import matplotlib.pyplot as plt import numpy as np ...
gpl-3.0
drmaize/ThermoAlign
TA_codes/PSE.py
1
36230
### PSE: Primer Specificity Evaluation (PSE) algorithm; a part of Thermo-Align tool for the design of template specific hybridization and priming oligonucleotides ### Version 1.0.0: 06/28/2016 ### Authors: Felix Francis (felixfrancier@gmail.com); Randall J. Wisser (rjw@udel.edu) ######################################...
gpl-3.0
GuessWhoSamFoo/pandas
pandas/tests/dtypes/test_dtypes.py
1
32521
# -*- coding: utf-8 -*- import re import numpy as np import pytest from pandas.core.dtypes.common import ( is_bool_dtype, is_categorical, is_categorical_dtype, is_datetime64_any_dtype, is_datetime64_dtype, is_datetime64_ns_dtype, is_datetime64tz_dtype, is_datetimetz, is_dtype_equal, is_interval_dtype, ...
bsd-3-clause
dgary50/eovsa
sf_display.py
1
106577
#!/usr/bin/env python # # History: # 2014-Dec-09 DG # Started this history log. The PCapture window was slowing taking longer # and longer to refresh, as more plots were added. Now explicitly clears # the plot before plotting a new one.0 # 2014-Dec-13 DG # Added text and highlight if ND is on. #...
gpl-2.0
dereneaton/ipyrad
ipyrad/analysis/baba.py
1
40715
#!/usr/bin/env python """ D-statistic calculations """ # pylint: disable=E1101 # pylint: disable=F0401 # pylint: disable=W0142 # pylint: disable=R0915 # pylint: disable=R0914 # pylint: disable=R0912 from __future__ import print_function, division from ipyrad.assemble.write_outputs import reftrick from ipyrad.assembl...
gpl-3.0
msimet/Stile
stile/sys_tests.py
1
122908
""" sys_tests.py: Contains the class definitions of the Stile systematics tests. """ """ This file contains some code from the AstroML package (http://github.com/astroML/astroML). For that code: Copyright (c) 2012-2013, Jacob Vanderplas All rights reserved. Redistribution and use in source and binary forms, with or ...
bsd-3-clause
nkhuyu/SFrame
oss_src/unity/python/sframe/data_structures/sframe.py
1
211694
""" This module defines the SFrame class which provides the ability to create, access and manipulate a remote scalable dataframe object. SFrame acts similarly to pandas.DataFrame, but the data is completely immutable and is stored column wise on the GraphLab Server side. """ ''' Copyright (C) 2015 Dato, Inc. All righ...
bsd-3-clause
maropu/spark
python/pyspark/pandas/generic.py
1
104806
# # 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
tdaylan/tdgu
wasp0121/main.py
1
53624
import os, sys import numpy as np import scipy import scipy.interpolate from scipy.interpolate import UnivariateSpline from scipy.signal import lombscargle import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib import seaborn as sns from astropy import constants as c # allesfitter ...
mit
CodingCat/mxnet
python/mxnet/model.py
1
41424
# 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
ageron/tensorflow
tensorflow/tools/compatibility/renames_v2.py
1
56576
# Copyright 2018 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
ivastar/clear
clear_grizli_pipeline.py
1
31233
#! /usr/bin/env python """ Grizli pipeline for the CLEAR collaboration. Author: C.M. Gosmeyer, Aug. 2017 Use: >>> python clear_grizli_pipeline.py --fields : (optional) By default all pointings. Or choose from [GS1, GS2, GS3, GS4, GS5, ERSPRIME, GN1, GN2, GN3, GN4, GN5, GN7] --steps : (...
mit
mdepasca/miniature-adventure
utilities.py
1
33644
""" Implementation of general use functions. """ import numpy as np import numpy.ma as ma import pandas as pd from pandas import DataFrame import cPickle import gzip import GPy import classes import time import os from os import path import argparse import matplotlib.pyplot as plt from cStringIO import StringIO import ...
unlicense
trevisanj/f311
f311/hapi.py
1
561633
# -*- coding: utf-8 -*- ''' This module provides an access to the HITRAN data. Data is downloaded and cached. This module serves as a simple database manager frontend. API is aimed to be RESTful, which means that interaction between local API and remote data-server will be held via sending RESTful queries (API->rem...
gpl-3.0
toobaz/pandas
pandas/core/internals/blocks.py
1
109175
from datetime import date, datetime, timedelta import functools import inspect import re from typing import Any, List import warnings import numpy as np from pandas._libs import NaT, Timestamp, lib, tslib, tslibs import pandas._libs.internals as libinternals from pandas._libs.tslibs import Timedelta, conversion from ...
bsd-3-clause
tedmeeds/tcga_encoder
tcga_encoder/models/survival_analysis.py
1
58512
from tcga_encoder.utils.helpers import * from tcga_encoder.definitions.locations import * import sklearn from sklearn.cluster import KMeans, SpectralClustering from sklearn.model_selection import KFold from tcga_encoder.models.lda import LinearDiscriminantAnalysis from sklearn.discriminant_analysis import LinearDiscrim...
mit
JRosenfeldIntern/data-assistant
UnitTests/test_stage.py
1
34381
import functools import pathlib import sys import traceback import unittest import xml.etree.ElementTree as ET import zipfile from inc_datasources import _XMLMethodNames, _localWorkspace, _outputDirectory, _daGPTools sys.path.insert(0, _daGPTools) import arcpy import pandas as pd import tempfile from scripts import d...
apache-2.0
sonidosmutantes/apicultor
apicultor/emotion/MusicEmotionMachine.py
1
56684
#! /usr/bin/env python3 # -*- coding: utf-8 -*- from ..utils.dj import * from ..machine_learning.cross_validation import * from ..gradients.descent import SGD from ..constraints.bounds import dsvm_low_a as la from ..constraints.bounds import dsvm_high_a as ha from ..constraints.bounds import es from ..constraints.temp...
gpl-3.0
meteoswiss-mdr/precipattractor
pymodules/ssft.py
1
59147
#!/usr/bin/env python from __future__ import division from __future__ import print_function import numpy as np import matplotlib.pyplot as plt import sys import os import time import pickle import radialprofile import cv2 import scipy as sp from scipy import fftpack from scipy.ndimage.interpolation import rotate f...
gpl-3.0
chemelnucfin/tensorflow
tensorflow/contrib/metrics/python/ops/metric_ops_test.py
1
282705
# 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
rtaubes/py-ssa
py/ssa.py
1
42675
#!/usr/bin/env python import os.path import sys import argparse import logging # sys.path.append(os.path.join(sys.path[0], "modules")) import modules.pssa as pssa import numpy as np import pylab as p from coeff_dlg import CoeffDlg from PyQt5 import QtWidgets, QtCore, QtWidgets from PyQt5.QtCore import pyqtSignal # ,...
gpl-2.0
wateraccounting/wa
Sheets/sheet2.py
1
52082
# -*- coding: utf-8 -*- """ Authors: Gonzalo Espinoza UNESCO-IHE 2016 Contact: g.espinoza@unesco-ihe.org Repository: https://github.com/wateraccounting/wa Module: Sheets/sheet2 """ import os import pandas as pd import subprocess import time import xml.etree.ElementTree as ET def create_sheet2(basin, period,...
apache-2.0
ainafp/nilearn
nilearn/group_sparse_covariance.py
1
42396
""" Implementation of algorithm for sparse multi-subjects learning of Gaussian graphical models. """ # Authors: Philippe Gervais # License: simplified BSD import warnings import collections import operator import itertools import numpy as np import scipy.linalg import sklearn.cross_validation import sklearn.covarian...
bsd-3-clause
TimoRoth/oggm
oggm/workflow.py
1
36367
"""Wrappers for the single tasks, multi processor handling.""" # Built ins import logging import os import shutil from collections.abc import Sequence # External libs import multiprocessing import numpy as np import pandas as pd from scipy import optimize as optimization # Locals import oggm from oggm import cfg, task...
bsd-3-clause
Balandat/pyDR
pyDR/simulation.py
1
33445
""" Functions for running a large number of simulations. @author: Maximilian Balandat @date Aug 13, 2016 """ import os import numpy as np import pandas as pd import logging import logging.config # logutils package required as QueueHandler/Listener not available <3.2 import logutils.queue from pyDR.dynamic_models imp...
mit
gbrammer/pygrism
catalogs.py
2
80285
""" Work with v1.6 catalogs """ import os #import pyfits import astropy.io.fits as pyfits import numpy as np import glob import shutil import re import time import matplotlib.pyplot as plt # from matplotlib.figure import Figure # from matplotlib.backends.backend_agg import FigureCanvasAgg import threedhst import t...
mit
colour-science/colour
colour/colorimetry/spectrum.py
1
101297
# -*- coding: utf-8 -*- """ Spectrum ======== Defines the classes and objects handling spectral data computations: - :class:`colour.SPECTRAL_SHAPE_DEFAULT` - :class:`colour.SpectralShape` - :class:`colour.SpectralDistribution` - :class:`colour.MultiSpectralDistributions` - :func:`colour.colorimetry.sds_and_...
bsd-3-clause
springcoil/pymc3
pymc3/distributions/continuous.py
1
69775
""" pymc3.distributions A collection of common probability distributions for stochastic nodes in PyMC. """ from __future__ import division import numpy as np import theano.tensor as tt from scipy import stats from scipy.interpolate import InterpolatedUnivariateSpline import warnings from pymc3.theanof import floatX...
apache-2.0
boomsbloom/dtm-fmri
DTM/for_gensim/lib/python2.7/site-packages/matplotlib/backends/backend_wx.py
1
63109
""" A wxPython backend for matplotlib, based (very heavily) on backend_template.py and backend_gtk.py Author: Jeremy O'Donoghue (jeremy@o-donoghue.com) Derived from original copyright work by John Hunter (jdhunter@ace.bsd.uchicago.edu) Copyright (C) Jeremy O'Donoghue & John Hunter, 2003-4 License: This work ...
mit
aolindahl/aolPyModules
tof.py
1
31988
#from setupEnvironment import * import numpy as np from configuration import loadConfiguration, load_configuration_dict import time import wiener from scipy.sparse import coo_matrix import sys import simplepsana import aolUtil _useWavelet = True if _useWavelet: try: from wavelet_filter import wavelet_filt...
gpl-2.0
AustereCuriosity/astropy
astropy/nddata/utils.py
1
34169
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module includes helper functions for array operations. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from copy import deepcopy import numpy as np from .decorators import support_...
bsd-3-clause
JamesSample/simple_hydropower_model
changing_hydropower_potential.py
1
39193
#------------------------------------------------------------------------------ # Name: changing_hydropower_potential_github.py # Purpose: Estimate climate change impacts on hydropower potential using # Future Flows catchment level summaries. # # Author: James Sample # # Created: # Cop...
mit
larsmans/scipy
scipy/signal/ltisys.py
3
82449
""" ltisys -- a collection of classes and functions for modeling linear time invariant systems. """ from __future__ import division, print_function, absolute_import # # Author: Travis Oliphant 2001 # # Feb 2010: Warren Weckesser # Rewrote lsim2 and added impulse2. # Aug 2013: Juan Luis Cano # Rewrote abcd_normaliz...
bsd-3-clause
chrsrds/scikit-learn
sklearn/preprocessing/data.py
2
110939
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Eric Martin <eric@ericmart.in> # Giorgio Patrini <giorgio.patrini@anu.edu.au> # ...
bsd-3-clause
RNAer/qiita
qiita_db/metadata_template/test/test_prep_template.py
1
65202
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
mick-d/nipype
nipype/algorithms/confounds.py
1
45521
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ''' Algorithms to compute confounds in :abbr:`fMRI (functional MRI)` Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname...
bsd-3-clause
haijieg/SFrame
oss_src/unity/python/sframe/test/test_sarray.py
1
113527
# -*- coding: utf-8 -*- ''' Copyright (C) 2015 Dato, Inc. All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' from ..data_structures.sarray import SArray from ..util.timezone import GMT from . import util import binascii import p...
bsd-3-clause
BryanCutler/spark
python/pyspark/pandas/groupby.py
1
109171
# # 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
winklerand/pandas
pandas/tests/io/formats/test_format.py
1
103145
# -*- coding: utf-8 -*- """ Test output formatting for Series/DataFrame, including to_string & reprs """ from __future__ import print_function import re import pytz import dateutil import itertools from operator import methodcaller import os import sys import warnings from datetime import datetime import pytest im...
bsd-3-clause
scholer/cadnano2.5
cadnano/part/nucleicacidpart.py
2
139590
# -*- coding: utf-8 -*- import math from ast import literal_eval from bisect import bisect_left from collections import ( defaultdict, deque ) from heapq import ( heapify, heappush, nsmallest ) from itertools import count as icount from typing import ( Iterable, Tuple, Union, List, ...
mit
ceos-seo/data_cube_utilities
data_cube_utilities/plotter_utils.py
1
126610
from collections import OrderedDict import re import copy import numpy as np import pandas as pd import xarray as xr import matplotlib as mpl import matplotlib.patches as mpatches import matplotlib.pyplot as plt from matplotlib.ticker import FuncFormatter from matplotlib.colors import LinearSegmentedColormap import ti...
apache-2.0
siddharthteotia/arrow
python/pyarrow/parquet.py
1
37750
# 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
ibamacsr/sentinelsat
tests/test_mod.py
1
31926
import hashlib import textwrap from datetime import date, datetime, timedelta from os import environ import geojson import py.path import pytest import requests_mock from sentinelsat import InvalidChecksumError, SentinelAPI, SentinelAPIError, geojson_to_wkt, read_geojson from sentinelsat.sentinel import _format_query...
agpl-3.0
chunweiyuan/xarray
xarray/tests/test_combine.py
1
30096
from collections import OrderedDict from copy import deepcopy from itertools import product import numpy as np import pandas as pd import pytest from xarray import DataArray, Dataset, Variable, auto_combine, concat from xarray.core.combine import ( _auto_combine, _auto_combine_1d, _auto_combine_all_along_first_di...
apache-2.0
Quantiacs/quantiacs-python
quantiacsToolbox/quantiacsToolbox.py
1
61202
from __future__ import (print_function, absolute_import) import traceback import json import imp import requests import webbrowser import re import datetime import time import inspect import os import os.path import sys import itertools from copy import deepcopy import multiprocessing import shelve import pickle impo...
mit
iainkirkpatrick/A-vs-B
AB_Class.py
1
122585
#------------------------------------------------------------------------------- # Name: AB_Class.py # Purpose: Classes for methods to be called for accessing the # SQLite3 database built in AB_GTFStoSQL.py, visualising it, and # performing analysis on it. # V...
gpl-3.0
cython-testbed/pandas
pandas/tests/series/test_operators.py
1
35182
# coding=utf-8 # pylint: disable-msg=E1101,W0612 import pytest from datetime import datetime, timedelta import operator from numpy import nan import numpy as np import pandas as pd from pandas import (Index, Series, DataFrame, isna, bdate_range, NaT, date_range, timedelta_range, Categorical) fro...
bsd-3-clause
matthewghgriffiths/nestedbasinsampling
nestedbasinsampling/graphs/disconnectivitygraphs.py
1
61736
from itertools import chain, izip, groupby from math import exp, log, sqrt import numpy as np from scipy.special import gammaln from scipy.integrate import quad import networkx as nx import matplotlib.pyplot as plt from nestedbasinsampling.disconnectivitydatabase import \ Minimum, Replica, Run, Database from...
gpl-3.0
lucidfrontier45/scikit-learn
sklearn/cross_validation.py
1
48860
""" The :mod:`sklearn.cross_validation` module includes utilities for cross- validation and performance evaluation. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>, # Gael Varoquaux <gael.varoquaux@normalesup.org>, # Olivier Grisel <olivier.grisel@ensta.org> # License: BSD Style. from _...
bsd-3-clause
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/core/internals.py
1
192094
import warnings import copy from warnings import catch_warnings import inspect 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.dtyp...
apache-2.0
STANDFIRE/standfire
apps/STANDFIRE_v1.1/fuels.py
1
50383
#!python2 ################################################################################ #----------# # fuels.py # #----------# """ This module is the interface to FVS. Given a FVS variant name, a keyword file and the corresponding tree file, a user can run an FVS simulation (``Fvsfuels class``) and request various ...
gpl-3.0
Huyston/WillNotebook
main.py
1
48197
import cherrypy import random from cherrypy.lib.static import serve_file import os from io import StringIO from subprocess import call import sys import dill as pickle #import pickle try: from sympy import latex except: print('No sympy installed') def msg(msg): return '<font class="msg dontprint">'+msg+'<...
gpl-2.0
jaeilepp/mne-python
mne/viz/raw.py
1
50018
"""Functions to plot raw M/EEG data.""" from __future__ import print_function # Authors: Eric Larson <larson.eric.d@gmail.com> # Jaakko Leppakangas <jaeilepp@student.jyu.fi> # # License: Simplified BSD import copy from functools import partial from warnings import warn import numpy as np from ..externals.s...
bsd-3-clause
dsm054/pandas
pandas/tests/indexes/datetimes/test_date_range.py
1
30998
""" test date_range, bdate_range construction from the convenience range functions """ from datetime import datetime, time, timedelta import numpy as np import pytest import pytz from pytz import timezone import pandas.compat as compat from pandas.errors import OutOfBoundsDatetime import pandas.util._test_decorators...
bsd-3-clause
dialounke/pylayers
pylayers/network/network.py
1
63165
# -*- coding:Utf-8 -*- """ .. currentmodule:: pylayers.network.network Node Class ========== .. autoclass:: Node :members: Network Class ============== .. autoclass: Network :members: PNetwork Class ============== SimPy Process compliant version of the Network class .. autoclass:: PNetwork :members...
mit
mistercrunch/panoramix
superset/utils/pandas_postprocessing.py
2
32031
# 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
petercable/xray
xray/test/test_backends.py
1
42555
from io import BytesIO from threading import Lock import contextlib import itertools import os.path import pickle import shutil import tempfile import unittest import sys import numpy as np import pandas as pd import xray from xray import Dataset, open_dataset, open_mfdataset, backends, save_mfdataset from xray.backe...
apache-2.0
guilgautier/DPPy
dppy/intermediate_sampling.py
1
46087
# MIT License # # Copyright (c) 2020 Laboratory for Computational and Statistical Learning # # authors: Daniele Calandriello # email: daniele.calandriello@iit.it # Website: http://lcsl.mit.edu # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentati...
mit
gkc1000/pyscf
pyscf/nao/nao.py
1
34884
from __future__ import print_function, division import sys, numpy as np from numpy import require from timeit import default_timer as timer from scipy.spatial.distance import cdist from scipy.sparse import coo_matrix from pyscf.nao.m_color import color as bc from pyscf.nao.m_system_vars_dos import system_vars_dos, s...
apache-2.0
slundberg/shap
shap/explainers/_tree.py
1
92486
import numpy as np import scipy.special import multiprocessing import sys import json import os import struct import itertools from distutils.version import LooseVersion from ._explainer import Explainer from ..utils import assert_import, record_import_error, safe_isinstance from ..utils._legacy import DenseData from ....
mit
linebp/pandas
pandas/tseries/offsets.py
1
95558
from datetime import date, datetime, timedelta 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, normalize_date from pandas.core.common import AbstractMethodErro...
bsd-3-clause
tkcroat/Augerquant
Modules/Auger_batch_import_functions.py
1
85040
# -*- coding: utf-8 -*- """ Created on Tue Apr 5 12:51:54 2016 @author: tkc """ import re, struct, os, glob # already run with functions import pandas as pd from PIL import Image, ImageDraw, ImageFont # needed for jpg creation import numpy as np # needed for image arrays # no need to clean or find/replace f...
mit
TUT-ARG/sed_vis
sed_vis/visualization.py
1
54744
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Visualization ================== This is module contains a simple visualizer to show event lists along with the audio. The visualizer can show multiple event lists for the same reference audio allowing the comparison of the reference and estimated event lists. .. imag...
mit
anisyonk/pilot
RunJob.py
1
95116
# Class definition: # RunJob # This is the main RunJob class; RunJobEvent etc will inherit from this class # Note: at the moment, this class is essentially the old runJob module turned object oriented. # The class will later become RunJobNormal, ie responible for running normal PanDA jobs. # At th...
apache-2.0
springcoil/pymc3
pymc3/model.py
1
49549
import collections import functools import itertools import threading import six import numpy as np import scipy.sparse as sps import theano.sparse as sparse from theano import theano, tensor as tt from theano.tensor.var import TensorVariable from pymc3.theanof import set_theano_conf import pymc3 as pm from pymc3.mat...
apache-2.0
tomevans/linvb
linvb/vbr_routines.py
1
40963
import numpy as np import scipy.special import scipy.linalg import vbr_utilities import time import pdb import copy import matplotlib.pyplot as plt import sys # TO DO: Check that the fixed Gamma hyper-hyperpriors that I use are appropriately uninformative... ##########################################################...
gpl-2.0
forestdussault/olc_webportalv2
olc_webportalv2/new_multisample/tasks.py
1
32336
import pandas as pd import csv import pandas_highcharts import zipfile import glob import os import json import multiprocessing from subprocess import Popen, check_output from background_task import background from olc_webportalv2.new_multisample.models import ProjectMulti, Sample, SendsketchResult, GenesipprResults, ...
mit
dwweiss/pmLib
src/plotArrays.py
1
36278
""" Copyright (c) 2016- by Dietmar W Weiss This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version. This software ...
lgpl-3.0
megbedell/wobble
wobble/data.py
1
31151
import numpy as np import h5py import matplotlib.pyplot as plt from itertools import compress from astropy.io import fits import pandas as pd from .utils import fit_continuum # attributes! REQUIRED_3D = ['xs', 'ys', 'ivars'] # R-order lists of (N-epoch, M-pixel) arrays REQUIRED_1D = ['bervs', 'airms'] # N-epoch array...
mit
gmorph/MAVProxy
MAVProxy/mavproxy.py
1
41141
#!/usr/bin/env python ''' mavproxy - a MAVLink proxy program Copyright Andrew Tridgell 2011 Released under the GNU GPL version 3 or later ''' import sys, os, time, socket, signal import fnmatch, errno, threading import serial, Queue, select import traceback import select import shlex from MAVProxy.modules.lib impor...
gpl-3.0