repo_name
string
path
string
copies
string
size
string
content
string
license
string
adamrvfisher/TechnicalAnalysisLibrary
RMultipleTracker55DayOneUnit.py
1
31417
# -*- coding: utf-8 -*- """ Created on Wed Jul 11 09:04:55 2018 @author: AmatVictoriaCuramIII """ #Developed in Python 3.5 #R Multiple Finder; Trade Tracking import numpy as np import random as rand import pandas as pd import time as t from DatabaseGrabber import DatabaseGrabber from YahooGrabber import...
apache-2.0
chrsrds/scikit-learn
sklearn/datasets/samples_generator.py
8
58675
""" Generate samples of synthetic data sets. """ # Authors: B. Thirion, G. Varoquaux, A. Gramfort, V. Michel, O. Grisel, # G. Louppe, J. Nothman # License: BSD 3 clause import numbers import array from collections.abc import Iterable import numpy as np from scipy import linalg import scipy.sparse as sp fro...
bsd-3-clause
NSLS-II/PyXRF
pyxrf/model/load_data_from_db.py
1
94973
from __future__ import absolute_import, division, print_function, unicode_literals import h5py import numpy as np import os import json import multiprocessing import pandas as pd import math import time as ttime import copy from distutils.version import LooseVersion import logging import warnings try: import dat...
bsd-3-clause
NathanYee/ThinkBayes2
bayesianLinearRegression/thinkbayes2.py
1
74401
"""This file contains code for use with "Think Stats" and "Think Bayes", both by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division """This file contains class definitions for: H...
gpl-2.0
medialab/ipinion-rank
ipinion.py
1
41557
#!/usr/bin/env python import code import codecs import contextlib import csv import gc import hashlib import json import logging import os import re import sys import time import urlparse import zlib from gexf import Gexf, GexfImport from datetime import datetime from optparse import OptionParser from ConfigParser im...
mit
majetideepak/arrow
python/pyarrow/parquet.py
1
51904
# 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
RegulatoryGenomicsUPF/pyicoteo
pyicoteolib/parser/common.py
1
30092
""" Parser Common: The common flags and functions shared between Pyicoteo parsers """ """ Pyicoteo 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 ve...
gpl-3.0
architecture-building-systems/CEAforArcGIS
cea/optimization/preprocessing/decentralized_buildings_cooling.py
1
37243
""" 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
lhilt/scipy
scipy/stats/_distn_infrastructure.py
1
125281
# # 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_, PY3 from scipy._lib._util import getargspec_no_self as _getargspec import sys import keyword import r...
bsd-3-clause
bullocke/ge-cdd
python/cdd_simple.py
1
39265
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Simple version of the Google Earth Engine Continuous Degradation i (CDD) algorithm for faster processing. CDD is built upon the Google Earth Engine's Python API and storage of the Landsat data archive. CDD utilizes a similar change detection approach to the Continuou...
mit
Unofficial-Extend-Project-Mirror/openfoam-extend-Breeder-other-scripting-PyFoam
PyFoam/Applications/SamplePlot.py
1
44067
# ICE Revision: $Id$ """ Application class that implements pyFoamSamplePlot.py """ import sys,string from os import path from optparse import OptionGroup from .PyFoamApplication import PyFoamApplication from PyFoam.RunDictionary.SampleDirectory import SampleDirectory from PyFoam.Basics.SpreadsheetData import WrongDa...
gpl-2.0
cython-testbed/pandas
pandas/core/arrays/categorical.py
1
87593
# pylint: disable=E1101,W0232 import numpy as np from warnings import warn import textwrap from pandas import compat from pandas.compat import u, lzip from pandas._libs import lib, algos as libalgos from pandas.core.dtypes.generic import ( ABCSeries, ABCIndexClass, ABCCategoricalIndex) from pandas.core.dtypes.mi...
bsd-3-clause
cython-testbed/pandas
pandas/tests/util/test_testing.py
1
34752
# -*- coding: utf-8 -*- import textwrap import os import pandas as pd import pytest import numpy as np import sys from pandas import Series, DataFrame import pandas.util.testing as tm import pandas.util._test_decorators as td from pandas.util.testing import (assert_almost_equal, raise_with_traceback, ...
bsd-3-clause
cdeboever3/cdpybio
tests/star/test_star.py
1
35611
from copy import deepcopy import os from numpy import array from numpy import nan import numpy as np import pandas as pd from pandas.util.testing import assert_frame_equal from pandas.util.testing import assert_panel_equal import pytest import cdpybio as cpb # Note: I use pos and neg in this file to refer to the plu...
mit
dhermes/google-cloud-python
bigquery/docs/snippets.py
2
111566
# Copyright 2016 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
plotly/python-api
packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/_colorbar.py
1
69895
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatterpolargl.marker" _path_str = "scatterpolargl.marker.colorbar" _valid_props = { ...
mit
FTAsr/STS
supervisedEval/AllScores_supervised_05.py
1
36167
#!/Users/fa/anaconda/bin/python ''' Evaluation code for the SICK dataset (SemEval 2014 Task 1) ''' import sys #sys.path = ['../gensim', '../models', '../utils'] + sys.path sys.path = ['../', '../featuremodels', '../utils', '../monolingual-word-aligner'] + sys.path # Local imports import gensim, utils from featuremode...
mit
ekostat/ekostat_calculator
event_handler.py
1
203019
# -*- coding: utf-8 -*- """ Created on Wed Jan 31 15:05:36 2018 @author: a001985 """ import os import shutil import time import datetime import numpy as np import json import codecs import re import pandas as pd import pickle # TODO: Move this! #current_path = os.path.dirname(os.path.dirname(os.path.dirname(os...
mit
pratapvardhan/pandas
pandas/core/indexing.py
1
91578
# pylint: disable=W0223 import textwrap import warnings import numpy as np from pandas.compat import range, zip import pandas.compat as compat from pandas.core.dtypes.generic import ABCDataFrame, ABCPanel, ABCSeries from pandas.core.dtypes.common import ( is_integer_dtype, is_integer, is_float, is_list_like...
bsd-3-clause
dattalab/d_code
imaging/io/tifffile.py
1
93987
#!/usr/bin/env python # -*- coding: utf-8 -*- # tifffile.py # Copyright (c) 2008-2012, Christoph Gohlke # Copyright (c) 2008-2012, The Regents of the University of California # Produced at the Laboratory for Fluorescence Dynamics # All rights reserved. # # Redistribution and use in source and binary forms, with or wit...
mit
janusassetallocation/loman
loman/computeengine.py
1
45236
import logging import os import tempfile import traceback from collections import namedtuple, defaultdict from concurrent.futures import ThreadPoolExecutor, FIRST_COMPLETED, wait from datetime import datetime from enum import Enum import inspect import decorator import dill import networkx as nx import pandas as pd im...
bsd-3-clause
rabrahm/zaspe
new3.py
1
54319
import sys #sys.path.append('/data/echelle/AUTOMOOGPUC/degradations/') #sys.path.append('/data/echelle/AUTOMOOGPUC/rot_conv/') import integration import rot_conv from astropy.io import fits as pyfits #import matplotlib.pyplot as plt import numpy as np import scipy from scipy import ndimage from scipy import interpolat...
mit
Nikakto/plotGUI
plotGUI.py
1
97676
# -*- coding: utf-8 -*- """ Created on Mon Feb 13 17:11:22 2017 @author: Paniker """ import sys # need for plot rnd import random import pyperclip from PyQt4 import QtGui from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas import matplotlib as mpl import matplotlib.p...
gpl-2.0
great-expectations/great_expectations
great_expectations/core/expectation_configuration.py
1
49533
import json import logging from copy import deepcopy from typing import Any, Dict import jsonpatch from great_expectations.core.evaluation_parameters import ( _deduplicate_evaluation_parameter_dependencies, build_evaluation_parameters, find_evaluation_parameter_dependencies, ) from great_expectations.core...
apache-2.0
macsharma/FORKS
arabidopsis_python/forks_fcns.py
1
49574
# -*- coding: utf-8 -*- """ Created on Sat Oct 29 18:57:55 2016 @author: mayank """ import numpy as np import pandas as pd import scipy as sp #from ggplot import * #del chopsticks #del diamonds #del meat #del movies #del mpg #del mtcars #del pageviews #del pigeons #del salmon import os from sklea...
gpl-3.0
rsteed11/GAT
gat/core/sna/sna.py
1
36487
import tempfile import matplotlib.pyplot as plt import networkx as nx import numpy as np from networkx.algorithms import bipartite as bi from networkx.algorithms import centrality from itertools import product from collections import defaultdict, namedtuple import pandas as pd import datetime from gat.core.sna import ...
mit
pylayers/pylayers
pylayers/antprop/signature.py
1
119947
#-*- coding:Utf-8 -*- from __future__ import print_function """ .. currentmodule:: pylayers.antprop.signature .. autosummary:: :members: """ import os import glob import doctest import numpy as np #import scipy as sp import scipy.linalg as la import pdb import h5py import copy import time import pickle import net...
mit
techtonik/numpy
numpy/lib/function_base.py
1
123720
from __future__ import division, absolute_import, print_function __docformat__ = "restructuredtext en" __all__ = [ 'select', 'piecewise', 'trim_zeros', 'copy', 'iterable', 'percentile', 'diff', 'gradient', 'angle', 'unwrap', 'sort_complex', 'disp', 'extract', 'place', 'vectorize', 'asarray_chkfinite', 'ave...
bsd-3-clause
thbuerg/Heidelberg_2017
DeeProtein/DeeProtein.py
1
68491
import helpers import customlayers import tensorlayer as tl import tensorflow as tf import time, os, glob import string import json import wget import numpy as np import re from tensorflow.contrib.tensorboard.plugins import projector from collections import OrderedDict from sklearn import decomposition np.set_printopti...
mit
rs2/pandas
pandas/tests/plotting/test_frame.py
1
134394
""" Test cases for DataFrame.plot """ from datetime import date, datetime import itertools import string import warnings import numpy as np from numpy.random import rand, randn import pytest import pandas.util._test_decorators as td from pandas.core.dtypes.api import is_list_like import pandas as pd from pandas im...
bsd-3-clause
pravsripad/jumeg
jumeg/jumeg_volmorpher.py
2
54869
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Authors: Daniel van de Velden (d.vandevelden@yahoo.de) # # License: BSD (3-clause) import os import os.path as op import time as time2 import mne import numpy as np from mne.transforms import (rotation, rotation3d, scaling, translation, ap...
bsd-3-clause
deapplegate/wtgpipeline
sed_plot.py
1
60012
import math, re, sys import pylab # matplotlib import os if not 'sne' in os.environ: os.environ['sne'] = '/nfs/slac/g/ki/ki04/pkelly' #os.environ['PYTHONPATH'] = os.environ['PYTHONPATH'] +':/nfs/slac/g/ki/ki04/pkelly/lib/python2.5/site-packages/PIL/' #def mkstellarcolorplot(): def make_thecorrections(cluster,DE...
mit
matthew-tucker/mne-python
mne/epochs.py
1
92857
"""Tools for working with epoched data""" # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de> # Denis Engemann <denis.engemann@gmail.com> # Mainak Jas <mainak@neuro...
bsd-3-clause
SIBBORK/SIBBORK
source/hdf_analysis_GUI.py
1
78719
""" Simple pyqtgraph application to investigate a SiBork driver file. """ import pyqtgraph as pg import pyqtgraph.opengl as pggl import pyqtgraph.console from pyqtgraph.Qt import QtCore, QtGui import numpy as np import h5py import dill from math import * import pandas as pd import StringIO from hdf_analysis import load...
gpl-2.0
vortex-ape/scikit-learn
sklearn/model_selection/tests/test_search.py
2
70357
"""Test the search module""" from sklearn.externals.six.moves import cStringIO as StringIO from sklearn.externals.six.moves import xrange from itertools import chain, product import pickle import sys from types import GeneratorType import re import warnings import numpy as np import scipy.sparse as sp import pytest ...
bsd-3-clause
JeanOlivier/pyHegel
pyHegel/util.py
1
39078
# -*- coding: utf-8 -*- ########################## Copyrights and license ############################ # # # Copyright 2011-2015 Christian Lupien <christian.lupien@usherbrooke.ca> # # ...
gpl-3.0
xuewei4d/scikit-learn
sklearn/decomposition/_nmf.py
3
48742
""" Non-negative matrix factorization. """ # Author: Vlad Niculae # Lars Buitinck # Mathieu Blondel <mathieu@mblondel.org> # Tom Dupre la Tour # License: BSD 3 clause import numbers import numpy as np import scipy.sparse as sp import time import warnings from math import sqrt from ._cdnmf_fast...
bsd-3-clause
fspaolo/scikit-learn
sklearn/metrics/pairwise.py
1
37190
# -*- coding: utf-8 -*- """ The :mod:`sklearn.metrics.pairwise` submodule implements utilities to evaluate pairwise distances or affinity of sets of samples. This module contains both distance metrics and kernels. A brief summary is given on the two here. Distance metrics are a function d(a, b) such that d(a, b) < d(...
bsd-3-clause
nextgenusfs/amptk
amptk/amptk.py
1
46407
#!/usr/bin/env python from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import os import importlib from natsort import natsorted from amptk import amptklib from pkg_resources import get_distribution __version__ = get_distribution('amptk').version d...
bsd-2-clause
PragyaJaiswal/Protein-Sequence-Parser
correlation_final_scaled.py
1
31984
#!/usr/bin/env python3 import numpy as np import operator import json from collections import Counter from sklearn.cluster import KMeans from sklearn.decomposition import PCA from matplotlib import pyplot # Amino acid patterns: A C D E F G H I K L M N P Q R S T V W X Y Mammali...
gpl-2.0
chrsrds/scikit-learn
sklearn/linear_model/tests/test_sag.py
1
31758
# Authors: Danny Sullivan <dbsullivan23@gmail.com> # Tom Dupre la Tour <tom.dupre-la-tour@m4x.org> # # License: BSD 3 clause import math import pytest import numpy as np import scipy.sparse as sp from sklearn.linear_model.sag import get_auto_step_size from sklearn.linear_model.sag_fast import _multinomial_gr...
bsd-3-clause
louispotok/pandas
pandas/core/frame.py
1
281250
""" DataFrame --------- An efficient 2D container for potentially mixed-type time series or other labeled data series. Similar to its R counterpart, data.frame, except providing automatic data alignment and a host of useful data manipulation methods having to do with the labeling information """ from __future__ import...
bsd-3-clause
sstoma/CellProfiler
cellprofiler/modules/measureobjectneighbors.py
1
35811
'''<b>Measure Object Neighbors</b> calculates how many neighbors each object has and records various properties about the neighbors' relationships, including the percentage of an object's edge pixels that touch a neighbor. <hr> Given an image with objects identified (e.g., nuclei or cells), this module determines how...
gpl-2.0
guma44/GEOparse
src/GEOparse/GEOTypes.py
1
39720
""" Classes that represent different GEO entities """ import abc import gzip import json import os import re import time from multiprocessing import Pool import numpy as np from pandas import DataFrame, concat from six import iteritems, itervalues from . import utils from .logger import geoparse_logger as logger fro...
bsd-3-clause
rs2/pandas
pandas/tests/groupby/aggregate/test_aggregate.py
1
38787
""" test .agg behavior / note that .apply is tested generally in test_groupby.py """ import functools from functools import partial import numpy as np import pytest from pandas.errors import PerformanceWarning from pandas.core.dtypes.common import is_integer_dtype import pandas as pd from pandas import DataFrame, I...
bsd-3-clause
rs2/pandas
pandas/core/base.py
1
47584
""" Base and utility classes for pandas objects. """ import builtins import textwrap from typing import Any, Callable, Dict, FrozenSet, Optional, Union import numpy as np import pandas._libs.lib as lib from pandas.compat import PYPY from pandas.compat.numpy import function as nv from pandas.errors import AbstractMet...
bsd-3-clause
yanlinqian/CS190.1X
ML_lab5_pca_student.py
1
66164
# coding: utf-8 # ![ML Logo](http://spark-mooc.github.io/web-assets/images/CS190.1x_Banner_300.png) # # **Principal Component Analysis Lab** # #### This lab delves into exploratory analysis of neuroscience data, specifically using principal component analysis (PCA) and feature-based aggregation. We will use a dataset...
mit
cgranade/qutip
qutip/visualization.py
3
45741
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
bsd-3-clause
plypaul/airflow
airflow/www/views.py
1
90464
# -*- coding: utf-8 -*- # # 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, software ...
apache-2.0
aflaxman/scikit-learn
sklearn/gaussian_process/gaussian_process.py
1
34641
# -*- coding: utf-8 -*- # Author: Vincent Dubourg <vincent.dubourg@gmail.com> # (mostly translation, see implementation details) # License: BSD 3 clause from __future__ import print_function import numpy as np from scipy import linalg, optimize from ..base import BaseEstimator, RegressorMixin from ..metrics...
bsd-3-clause
madscatt/zazzie
src/sassie/calculate/sld_mol/sld_mol.py
2
45256
''' SASSIE: Copyright (C) 2011 Joseph E. Curtis, Ph.D., Hirsh Nanda, Ph.D. 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 optio...
gpl-3.0
arongdari/digbeta
tour/src/ijcai15.py
1
48821
import math import pulp import re import random import numpy as np import statistics as stat import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d #from datetime import datetime class PersTour: """Reproduce the IJCAI'15 paper""" def __init__(self, dirname, fname, fpoi=None, writeFile=True):...
gpl-3.0
UMN-Hydro/GSFLOW_pre-processor
python_scripts/MODFLOW_scripts/MODFLOW_NWT_lib.py
1
77239
# -*- coding: utf-8 -*- """ Created on Sun Sep 17 22:34:30 2017 MODFLOW_NWT_lib This library includes all the separate matlab functions for writing the different MODFLOW input files @author: gcng """ import numpy as np import pandas as pd # for data structures and reading in data from text file import matplotlib.py...
gpl-3.0
SU-ECE-17-7/hotspotter
hscom/helpers.py
1
58687
''' This is less of a helper function file and more of a pile of things where I wasn't sure of where to put. A lot of things could probably be consolidated or removed. There are many non-independent functions which are part of HotSpotter. They should be removed and put into their own module. The standalone functions sh...
apache-2.0
XueqingLin/tensorflow
tensorflow/contrib/learn/python/learn/estimators/dnn_test.py
1
39011
# 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
wheeler-microfluidics/dmf_control_board_plugin
feedback.py
1
88763
""" Copyright 2011-2016 Ryan Fobel and Christian Fobel This file is part of dmf_control_board. dmf_control_board 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 optio...
bsd-3-clause
mgaitan/scipy
scipy/stats/stats.py
2
162522
# Copyright (c) Gary Strangman. All rights reserved # # Disclaimer # # This software is provided "as-is". There are no expressed or implied # warranties of any kind, including, but not limited to, the warranties # of merchantability and fitness for a given application. In no event # shall Gary Strangman be liable fo...
bsd-3-clause
Djabbz/scikit-learn
sklearn/neighbors/base.py
1
31051
"""Base and mixin classes for nearest neighbors""" # Authors: Jake Vanderplas <vanderplas@astro.washington.edu> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Sparseness support by Lars Buitinck <L.J.Buitinck@uva.nl> # Multi-output...
bsd-3-clause
pratapvardhan/pandas
pandas/core/tools/datetimes.py
1
30078
from functools import partial from datetime import datetime, timedelta, time from collections import MutableMapping import numpy as np from pandas._libs import tslib from pandas._libs.tslibs.strptime import array_strptime from pandas._libs.tslibs import parsing, conversion from pandas._libs.tslibs.parsing import ( #...
bsd-3-clause
trystynb/ContFit
tb_contfit.py
1
48325
#!/usr/bin/python2.7 """ TB_CONTFIT.PY V1.2 (15/07/2016) -Included cuntinous point editor -Fixed bugs with opening new files. Author: Trystyn Berg (trystynb@uvic.ca) SUMMARY AND USAGE: Stand-alone python application to fit continuum to spectrum. Load a spectrum from fits file, and fit a cubic spline to the s...
mit
mganeva/mantid
qt/applications/workbench/workbench/widgets/plotselector/view.py
1
32051
# 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 # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench....
gpl-3.0
ZGainsforth/StoichiometryFitter
StoichiometryFitter.py
1
33210
#!/usr/bin/env python # -*- coding: US-ASCII -*- # # generated by wxGlade 0.6.8 on Thu Mar 6 15:07:47 2014 # __author__ = 'Zack Gainsforth' __copyright__ = 'Copyright 2016, Zack Gainsforth' __email__ = 'zsg@gainsforth.com' # TODO Print out k-facs used. # TODO Site occupation and endmember fitter. A py file for each...
epl-1.0
materialsproject/pymatgen
pymatgen/analysis/pourbaix_diagram.py
1
42106
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module is intended to be used to compute Pourbaix diagrams of arbitrary compositions and formation energies. If you use this module in your work, please consider citing the following: General formalis...
mit
shoyer/xray
xarray/tests/test_dataset.py
1
204616
# -*- coding: utf-8 -*- import pickle import sys import warnings from collections import OrderedDict from copy import copy, deepcopy from io import StringIO from textwrap import dedent import numpy as np import pandas as pd import pytest import xarray as xr from xarray import ( ALL_DIMS, DataArray, Dataset, Index...
apache-2.0
NicWayand/xray
xarray/core/dataarray.py
1
53975
import contextlib import functools import warnings import numpy as np import pandas as pd from ..plot.plot import _PlotMethods from . import indexing from . import groupby from . import rolling from . import ops from . import utils from .alignment import align from .common import AbstractArray, BaseDataObject, squee...
apache-2.0
olologin/scikit-learn
sklearn/model_selection/_validation.py
1
36451
""" The :mod:`sklearn.model_selection._validation` module includes classes and functions to validate the model. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>, # Gael Varoquaux <gael.varoquaux@normalesup.org>, # Olivier Grisel <olivier.grisel@ensta.org> # License: BSD 3 clause from __...
bsd-3-clause
jslhs/sunpy
sunpy/map/map.py
1
31438
""" Map is a generic Map class from which all other Map classes inherit from. """ from __future__ import absolute_import #pylint: disable=E1101,E1121,W0404,W0613 __authors__ = ["Keith Hughitt, Steven Christe"] __email__ = "keith.hughitt@nasa.gov" import os import pyfits import numpy as np import matplotlib.pyplot as ...
bsd-2-clause
smorton2/think-stats
code/thinkstats2.py
1
70025
"""This file contains code for use with "Think Stats" and "Think Bayes", both by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division """This file contains class definitions for: H...
gpl-3.0
davidovitch/freeyaw-ojf-wt-tests
ojfdb.py
1
94311
# -*- coding: utf-8 -*- """ Created on Wed Oct 17 17:37:00 2012 Make a database of all the test and their results @author: dave """ #from __future__ import print_function from __future__ import division from __future__ import unicode_literals from __future__ import absolute_import import os import pickle import str...
gpl-3.0
lfairchild/PmagPy
dialogs/thellier_interpreter.py
1
70689
#!/usr/bin/env python #--------------------------------------------------------------------------- # Author: Ron Shaar # Revision notes # # Rev 2.1 June 4th 2015. # Fix small zero division bug. # # Rev 2.0 November 2014 # # Rev 1.0 Initial revision August 2012 # # #-----------------------------------------------------...
bsd-3-clause
thomasorb/orb
orb/core.py
1
127365
#!/usr/bin/python # *-* coding: utf-8 *-* # Author: Thomas Martin <thomas.martin.1@ulaval.ca> # File: core.py ## Copyright (c) 2010-2020 Thomas Martin <thomas.martin.1@ulaval.ca> ## ## This file is part of ORB ## ## ORB is free software: you can redistribute it and/or modify it ## under the terms of the GNU General P...
gpl-3.0
aditiiyer/CERR
CERR_core/ModelImplementationLibrary/SegmentationModels/ModelDependencies/CT_HeadAndNeck_SelfAttention/augmentation_pytorch_jj.py
1
87071
import sys, os import numpy as np from matplotlib import pyplot as plt from scipy.io import loadmat from skimage import io #os.environ['KERAS_BACKEND'] = 'theano' #os.environ['THEANO_FLAGS'] = 'mode=FAST_RUN, device=gpu0, floatX=float32,optimizer=fast_compile,assert_no_cpu_op=raise,#print_global_stats=True'#pycuda.i...
lgpl-2.1
rs2/pandas
pandas/tests/reductions/test_reductions.py
1
44904
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, isna, timedelta_r...
bsd-3-clause
cloud-fan/spark
python/pyspark/pandas/groupby.py
1
112084
# # 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
amolkahat/pandas
pandas/tests/arithmetic/test_datetime64.py
1
73593
# -*- coding: utf-8 -*- # Arithmetc tests for DataFrame/Series/Index/Array classes that should # behave identically. # Specifically for datetime64 and datetime64tz dtypes import operator from datetime import datetime, timedelta import warnings from itertools import product, starmap import numpy as np import pytest imp...
bsd-3-clause
jbrundle/earthquake-forecasts
EQMethods_backup_1-24-2016.py
1
40751
#!/opt/local/bin python #import sys #sys.path.reverse() # Earthquake Methods library of methods and functions # # This code base collects the methods and functions used to make # plots and maps of earthquake data and activity # ##########################################################...
mit
herilalaina/scikit-learn
sklearn/cross_validation.py
3
73483
""" 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 3 clause from...
bsd-3-clause
DailyActie/Surrogate-Model
01-codes/scikit-learn-master/sklearn/linear_model/tests/test_logistic.py
1
39612
import numpy as np import scipy.sparse as sp from scipy import linalg, optimize, sparse from sklearn.datasets import load_iris, make_classification from sklearn.exceptions import ConvergenceWarning from sklearn.linear_model.logistic import ( LogisticRegression, logistic_regression_path, LogisticRegressionCV, ...
mit
datactive/bigbang
bigbang/listserv.py
1
47859
import datetime import email import glob import logging import mailbox import os import re import subprocess import time import warnings from mailbox import mboxMessage from pathlib import Path from typing import Dict, List, Optional, Tuple, Union from urllib.parse import urljoin, urlparse import numpy as np import pa...
agpl-3.0
openmeteo/enhydris
enhydris/tests/test_models.py
2
51867
import datetime as dt from io import StringIO from unittest import mock from django.contrib.auth.models import User from django.contrib.gis.geos import MultiPolygon, Point, Polygon from django.db import IntegrityError from django.db.models.signals import post_save from django.test import TestCase, override_settings fr...
agpl-3.0
dssg/wikienergy
disaggregator/build/pandas/pandas/tseries/tests/test_tslib.py
1
33140
import nose from distutils.version import LooseVersion import numpy as np from pandas import tslib import datetime from pandas.core.api import Timestamp, Series, Timedelta from pandas.tslib import period_asfreq, period_ordinal, get_timezone from pandas.tseries.index import date_range from pandas.tseries.frequencies i...
mit
BryanCutler/spark
python/pyspark/sql/dataframe.py
1
99845
# # 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
survey-methods/samplics
tests/estimation/test_expansion.py
1
59667
import numpy as np import pandas as pd from samplics.estimation import TaylorEstimator np.random.seed(12345) yrbs = pd.read_csv("./tests/estimation/yrbs.csv") yrbs["y"] = yrbs["qn8"].replace({2: 0}) yrbs["x"] = 0.8 * yrbs["y"] + 0.5 yrbs["domain"] = np.random.choice(["d1", "d2", "d3"], size=yrbs.shape[0], p=[0.1, ...
mit
magic2du/contact_matrix
Contact_maps/DeepLearning/DeepLearningTool/DL_contact_matrix_New_Server_0625_2015.py
1
47389
# coding: utf-8 # In[5]: import sys, os sys.path.append('../../../libs/') sys.path.append('../libs/') sys.path.append('../../libs/') import os.path import IO_class from IO_class import FileOperator from sklearn import cross_validation import sklearn import csv from dateutil import parser from datetime import timede...
gpl-2.0
transceptor-technology/siridb-server
itest/test_log.py
1
55082
import asyncio import functools import random import time from testing import Client from testing import default_test_setup from testing import gen_data from testing import gen_points from testing import gen_series from testing import InsertError from testing import PoolError from testing import QueryError from testing...
mit
ejhumphrey/harmonic-cnn
hcnn/driver.py
1
34382
"""Top-level routines, including: * extract_features * train_model * find_best_model * predict * analyze * fit_and_predict_one * fit_and_predict_cross_validation """ import boltons.fileutils import datetime import glob import json import logging import numpy as np import os import pandas as pd import shutil import sk...
isc
anntzer/scikit-learn
sklearn/tree/_export.py
3
37181
""" 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
harisbal/pandas
pandas/tests/test_multilevel.py
1
109296
# -*- coding: utf-8 -*- # pylint: disable-msg=W0612,E1101,W0141 from warnings import catch_warnings, simplefilter import datetime import itertools import pytest import pytz from numpy.random import randn import numpy as np from pandas.core.index import Index, MultiIndex from pandas import (Panel, DataFrame, Series, n...
bsd-3-clause
bsmurphy/PyKrige
pykrige/ok3d.py
1
39755
# coding: utf-8 """ PyKrige ======= Code by Benjamin S. Murphy and the PyKrige Developers bscott.murphy@gmail.com Summary ------- Contains class OrdinaryKriging3D. References ---------- .. [1] P.K. Kitanidis, Introduction to Geostatistcs: Applications in Hydrogeology, (Cambridge University Press, 1997) 272 p. .....
bsd-3-clause
pyrrho314/recipesystem
trunk/gempy/tests/mosaic/rtf_mosaic.py
1
36773
#!/usr/bin/env python # EDITED for RTF tests. nz Nov 28 2013 # Acceptance Tests # # This module puts together all the Aceptance Tests for the Mosaic project and it # can be run in conjunction with the explanations in the MS Word document: # ATPMosaic-Oct4.docx # To run individual tests: # UNIX shell: #% atp_mosai...
mpl-2.0
magic2du/contact_matrix
Contact_maps/DeepLearning/DeepLearningTool/DL_contact_matrix_load2-new10fold_10_11_2014_server.py
1
40152
# coding: utf-8 # In[3]: import sys, os sys.path.append('../../../libs/') import os.path import IO_class from IO_class import FileOperator from sklearn import cross_validation import sklearn import numpy as np import csv from dateutil import parser from datetime import timedelta from sklearn import svm import numpy ...
gpl-2.0
wmvanvliet/mne-python
mne/source_estimate.py
1
127603
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Matti Hämäläinen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Mads Jensen <mje.mads@gmail.com> # # License: BSD (3-clause) import contextlib import copy import os.path as op from types import Generator...
bsd-3-clause
jonathanhogg/scopething
scope.py
1
30987
""" scope ===== Code for talking to the BitScope series of USB digital mixed-signal scopes. Only supports the BS000501 at the moment, but that's only because it's never been tested on any other model. """ # pylama:ignore=E0611,E1101,W0201,W1203,W0631,C0103,R0902,R0912,R0913,R0914,R0915,C0415,W0601,W0102 import argpa...
bsd-2-clause
maxwell-lv/MyQuant
index_list/__init__.py
1
36779
import pandas as pd from io import StringIO import click import os import sys JSON_DATA = """ [ {"name": "上证指数", "symbol": "000001.XSHG"}, {"name": "A股指数", "symbol": "000002.XSHG"}, {"name": "B股指数", "symbol": "000003.XSHG"}, {"name": "工业指数", "symbol": "000004.XSHG"}, {"name": "商业指数", "symbol": "000005.XSHG"}...
gpl-3.0
ARudiuk/mne-python
mne/evoked.py
1
60718
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Denis Engemann <denis.engemann@gmail.com> # Andrew Dykstra <andrew.r.dykstra@gmail.com> # Mads Jensen <mje.mads@gmail.com> # # License: BSD (3-clause) from copy imp...
bsd-3-clause
e-koch/FilFinder
fil_finder/filament.py
1
56431
# Licensed under an MIT open source license - see LICENSE import numpy as np import astropy.units as u import networkx as nx import warnings import scipy.ndimage as nd from astropy.nddata import extract_array import astropy.modeling as mod from astropy.modeling.models import Gaussian1D, Const1D import sys if sys.vers...
mit
kushalbhola/MyStuff
Practice/PythonApplication/env/Lib/site-packages/pandas/tests/scalar/period/test_period.py
1
53666
from datetime import date, datetime, timedelta import numpy as np import pytest import pytz from pandas._libs.tslibs import iNaT, period as libperiod from pandas._libs.tslibs.ccalendar import DAYS, MONTHS from pandas._libs.tslibs.frequencies import INVALID_FREQ_ERR_MSG from pandas._libs.tslibs.parsing import DatePars...
apache-2.0
dsm054/pandas
pandas/tests/frame/test_to_csv.py
1
46580
# -*- coding: utf-8 -*- from __future__ import print_function import os import csv import pytest import numpy as np from pandas.compat import (lmap, range, lrange, StringIO, u) from pandas.io.common import _get_handle import pandas.core.common as com from pandas.errors import ParserError from pandas import (DataFra...
bsd-3-clause
bowenliu16/deepchem
deepchem/data/datasets.py
1
30135
""" Contains wrapper class for datasets. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import os import numpy as np import pandas as pd import random from functools import partial from deepchem.utils.save import save_to_disk from deepchem.utils.save im...
gpl-3.0
CamDavidsonPilon/lifelines
lifelines/utils/__init__.py
1
69975
# -*- coding: utf-8 -*- from typing import Union, Any, Tuple, List, Callable, Optional, Dict from datetime import datetime from functools import wraps from textwrap import dedent from enum import Enum import collections import warnings from numpy import ndarray import numpy as np from scipy.integrate import quad, tr...
mit