repo_name
string
path
string
copies
string
size
string
content
string
license
string
Erotemic/ibeis
ibeis/templates/notebook_cells.py
1
33630
# -*- coding: utf-8 -*- """ ComamndLine: python -m ibeis --tf autogen_ipynb --ipynb --db PZ_MTEST --ipynb """ from __future__ import absolute_import, division, print_function, unicode_literals import utool as ut COMMENT_SPACE = ut.codeblock( r''' ### Comment space below: ''') IGNOREAFTER = (ut.codebl...
apache-2.0
erramuzpe/NeuroVault
neurovault/apps/statmaps/views.py
2
56878
import csv import functools import gzip import json import nibabel as nib import nidmresults import numpy as np import os import re import shutil import tarfile import tempfile import traceback import urllib import zipfile import zipstream from collections import OrderedDict from django.contrib import messages from dja...
mit
sylvchev/mdla
mdla/mdla.py
1
53375
""" Multivariate dictionary learning""" # Author: Sylvain Chevallier # License: GPL v3 import itertools import sys from time import time import numpy as np # Pour array3d import scipy.sparse as sp from joblib import Parallel, cpu_count, delayed from numpy import floor from sklearn.base import BaseEstimator, Transfor...
gpl-3.0
huzq/scikit-learn
sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py
1
58621
"""Fast Gradient Boosting decision trees for classification and regression.""" # Author: Nicolas Hug from abc import ABC, abstractmethod from functools import partial import numpy as np from timeit import default_timer as time from ...base import (BaseEstimator, RegressorMixin, ClassifierMixin, i...
bsd-3-clause
basnijholt/holoviews
holoviews/plotting/bokeh/element.py
1
93489
from __future__ import absolute_import, division, unicode_literals import warnings from types import FunctionType import param import numpy as np import bokeh import bokeh.plotting from bokeh.core.properties import value from bokeh.document.events import ModelChangedEvent from bokeh.models import Renderer, Title, Le...
bsd-3-clause
brianlorenz/COSMOS_IMACS_Redshifts
Redshift_Measurement/CrossCor.py
1
65757
import numpy as np import glob import sys import getopt import os from astropy.io import fits from scipy.interpolate import interp1d, splrep, splev, sproot from scipy.optimize import fsolve import matplotlib.pyplot as plt from matplotlib.widgets import Button, SpanSelector, CheckButtons from matplotlib import...
mit
renatolm/endometriose
vassilis_meet.py
1
46302
from __future__ import division import numpy as np import skfuzzy as fuzz import matplotlib.pyplot as plt import scipy.integrate as integrate def vassilis_defuzz(dism,disp,dor,cans): dismenorreia = dism dispareunia = disp dorNasCostasPernas = dor cansaco = cans def nivel_leve_decresc(h): return 5-(5*h) def n...
gpl-3.0
marrabld/planarradpy
gui/gui_mainLayout.py
1
42270
#!/usr/bin/env python import PyQt4 from PyQt4 import QtGui import subprocess from time import sleep from timeit import Timer from gui_About import * import PyQt4.QtCore import sys import os import multiprocessing import re import webbrowser from PyQt4.QtGui import QContextMenuEvent, QMessageBox, QApplication, QWidget,...
gpl-2.0
kevin-coder/tensorflow-fork
tensorflow/tools/compatibility/renames_v2.py
1
57016
# 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
cython-testbed/pandas
pandas/core/sparse/array.py
1
49305
""" SparseArray data structure """ from __future__ import division # pylint: disable=E1101,E1103,W0231 import operator import numbers import numpy as np import warnings import pandas as pd from pandas.core.base import PandasObject from pandas import compat from pandas.errors import PerformanceWarning from pandas.com...
bsd-3-clause
quantopian/alphalens
alphalens/utils.py
1
42081
# # Copyright 2018 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
OmnesRes/prepub
mysite/views.py
1
120335
from django.http import Http404, HttpResponse from django.template.loader import get_template from django.template import Context from django.shortcuts import render from django.shortcuts import redirect from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib.synd...
mit
pratapvardhan/pandas
pandas/io/pytables.py
1
165758
""" High level interface to PyTables for reading and writing pandas data structures to disk """ # pylint: disable-msg=E1101,W0613,W0603 from datetime import datetime, date import time import re import copy import itertools import warnings import os from pandas.core.dtypes.common import ( is_list_like, is_cate...
bsd-3-clause
lukaselmer/ethz-data-mining
2-svm/code/mapper.py
1
31068
#!/usr/bin/env python2.7 import sys import math import numpy as np import scipy from sklearn import linear_model from sklearn.svm import LinearSVC from sklearn.kernel_approximation import SkewedChi2Sampler, RBFSampler, AdditiveChi2Sampler, Nystroem #from sklearn.multiclass import OneVsRestClassifier #from sklearn.svm...
mit
TAMU-CLASS/barnfire
src/indicators.py
1
63477
#! /usr/bin/env python ''' Andrew Till Fall 2014 PhD Research Driver for creating the generalized energy mesh using clustering of observations based on similarity indicators. The indicators should be correlated with the flux: particles with energies that have similar indicators should have similar fluxes for all (r,O...
mit
AutonomyLab/deep_intent
code/autoencoder_model/scripts/thesis_scripts/classifier_allsports.py
1
49347
from __future__ import absolute_import from __future__ import division from __future__ import print_function import hickle as hkl import numpy as np np.random.seed(2 ** 10) from keras import backend as K K.set_image_dim_ordering('tf') import tensorflow as tf import time from keras import regularizers from keras.laye...
bsd-3-clause
cjayb/mne-python
mne/label.py
2
95345
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) from collections import defaultdict from colorsys import hsv_to_rgb, rgb_to_hsv import os import os.path as op import copy ...
bsd-3-clause
jor-/scipy
scipy/stats/_continuous_distns.py
1
221290
# -*- coding: utf-8 -*- # # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy._lib.doccer import (extend_notes_in_docstring, ...
bsd-3-clause
laurentperrinet/Khoei_2017_PLoSCB
scripts/MotionParticlesFLE.py
1
96890
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import __author__ = "Laurent Perrinet INT - CNRS" __licence__ = 'BSD licence' DEBUG = True DEBUG = False """ MotionParticlesFLE.py Script file for MotionParticles See http://invibe.net/LaurentPerrinet/Publications...
mit
amolkahat/pandas
pandas/core/reshape/merge.py
1
61419
""" SQL-style merge routines """ import copy import warnings import string import numpy as np from pandas.compat import range, lzip, zip, map, filter import pandas.compat as compat from pandas import (Categorical, DataFrame, Index, MultiIndex, Timedelta, Series) from pandas.core.arrays.categorica...
bsd-3-clause
pinellolab/haystack_bio
haystack/find_motifs.py
1
38942
# python modules import multiprocessing as mp from functools import partial import uuid import subprocess as sb import os import sys import random import argparse import ntpath import shutil from collections import defaultdict import codecs try: import cPickle as cp except: import pickle as cp # commmon funct...
agpl-3.0
BryanCutler/spark
python/pyspark/pandas/frame.py
1
428289
# # 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
dannyjacobs/PRISim
main/MWA_interferometer_array_delay_spectrum_simulations_vs_data_diagnostics.py
1
73858
import numpy as NP from astropy.io import fits from astropy.io import ascii import scipy.constants as FCNST from scipy import interpolate import matplotlib.pyplot as PLT import matplotlib.colors as PLTC import matplotlib.cm as CMAP import matplotlib.animation as MOV from matplotlib import ticker from scipy.interpolate...
mit
popgengui/negui
agestrucne/asnviz/LineRegress.py
1
35999
from __future__ import division from __future__ import print_function #created by Brian Trethewey # #neGrapher is primary interface for graphing data #neStats is primary interface for creating statistics output file for a dataset from future import standard_library standard_library.install_aliases() from builtins imp...
agpl-3.0
Haunter17/MIR_SU17
exp3/exp3b/exp3b.py
1
57208
import numpy as np import tensorflow as tf import h5py import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import sys # Functions for initializing neural nets parameters def init_weight_variable(shape, nameIn): initial = tf.truncated_normal(shape, stddev=0.1, dtype=tf.float32) retu...
mit
kjordahl/xray
xray/conventions.py
1
35346
from datetime import datetime import re import traceback import warnings import numpy as np import pandas as pd from collections import defaultdict from pandas.tslib import OutOfBoundsDatetime from .core import indexing, ops, utils from .core.formatting import format_timestamp, first_n_items from .core.variable impor...
apache-2.0
jiajunshen/partsNet
pnet/oriented_gaussian_parts_layer.py
1
30760
from __future__ import division, print_function, absolute_import import numpy as np import itertools as itr import amitgroup as ag from pnet.layer import Layer import pnet import pnet.matrix from scipy import linalg from sklearn.utils.extmath import logsumexp, pinvh def _log_multivariate_normal_density_diag(X, means...
bsd-3-clause
pmacosta/putil
putil/plot/panel.py
1
46972
# panel.py # Copyright (c) 2013-2016 Pablo Acosta-Serafini # See LICENSE for details # pylint: disable=C0111,C0302,R0912,R0913,R0914,R0915,W0105,W0212 # PyPI imports import numpy import matplotlib.pyplot as plt # Putil imports import putil.exh import putil.pcontracts from .series import Series from .functions import _...
mit
MotokiShiga/stem-nmf
old/python_ver0.1/libnmf_jit.py
1
39210
""" NMF (Nonnegative Matrix Factorization) for Spectrum Imaging Data Analysis """ # Author: Motoki Shiga <shiga_m@gifu-u.ac.jp> # License: MIT # # Reference # [1] Motoki Shiga, Kazuyoshi Tatsumi, Shunsuke Muto, Koji Tsuda, # Yuta Yamamoto, Toshiyuki Mori, Takayoshi Tanji, # "Sparse Modeling of EELS and EDX ...
mit
louispotok/pandas
pandas/core/reshape/reshape.py
1
35421
# pylint: disable=E1101,E1103 # pylint: disable=W0703,W0622,W0613,W0201 from pandas.compat import range, text_type, zip from pandas import compat from functools import partial import itertools import numpy as np from pandas.core.dtypes.common import ( _ensure_platform_int, is_list_like, is_bool_dtype, nee...
bsd-3-clause
gfyoung/pandas
pandas/core/indexes/datetimes.py
1
40667
from __future__ import annotations from datetime import date, datetime, time, timedelta, tzinfo import operator from typing import TYPE_CHECKING, Optional, Tuple import warnings import numpy as np from pandas._libs import NaT, Period, Timestamp, index as libindex, lib from pandas._libs.tslibs import ( Resolution...
bsd-3-clause
MTgeophysics/mtpy
legacy/modeling/modem_model.py
1
86611
#!/usr/bin/env python """ Description: Define the Model class. This module is refactored from modem.py which had over 5000 lines too big to manage and edit Author: fei.zhang@ga.gov.au Date: 2017-06-05 """ from __future__ import print_function import os import matplotlib.pyplot as plt import numpy as np ...
gpl-3.0
GoogleCloudPlatform/training-data-analyst
courses/machine_learning/deepdive2/production_ml/labs/samples/contrib/e2e-outlier-drift-explainer/seldon/seldon_e2e_adult.kale.nfs.py
2
49695
import kfp.dsl as dsl import json import kfp.components as comp from collections import OrderedDict from kubernetes import client as k8s_client def setup(MINIO_ACCESS_KEY: str, MINIO_HOST: str, MINIO_MODEL_BUCKET: str, MINIO_SECRET_KEY: str): pipeline_parameters_block = ''' MINIO_ACCESS_KEY = "{}" MINIO_H...
apache-2.0
Hiteshsaai/BikeShare_DataAnalysis
Bike_Share_Analysis.py
1
39685
# coding: utf-8 # # 2016 US Bike Share Activity Snapshot # # ## Table of Contents # - [Introduction](#intro) # - [Posing Questions](#pose_questions) # - [Data Collection and Wrangling](#wrangling) # - [Condensing the Trip Data](#condensing) # - [Exploratory Data Analysis](#eda) # - [Statistics](#statistics) # ...
mit
alanmcruickshank/superset-dev
superset/models/core.py
1
33495
"""A collection of ORM sqlalchemy models for Superset""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from copy import copy, deepcopy from datetime import date, datetime import functools import json import logging i...
apache-2.0
xguse/scikit-bio
skbio/sequence/tests/test_sequence.py
2
106092
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
bsd-3-clause
demisto/content
Packs/Base/Scripts/DBotTrainClustering/DBotTrainClustering.py
1
43461
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import pandas as pd import numpy as np import collections import dill as pickle import builtins from sklearn.pipeline import Pipeline from sklearn.compose import ColumnTransformer from sklearn import cluster from sklear...
mit
pratapvardhan/pandas
pandas/core/groupby/groupby.py
1
173320
import types from functools import wraps, partial import numpy as np import datetime import collections import warnings import copy from textwrap import dedent from contextlib import contextmanager from pandas.compat import ( zip, range, lzip, callable, map ) from pandas import compat from pandas.compat.numpy...
bsd-3-clause
StuntsPT/Structure_threader
structure_threader/plotter/structplot.py
1
38720
#!/usr/bin/python3 # Copyright 2015-2020 Francisco Pina Martins <f.pinamartins@gmail.com> # and Diogo N. Silva <o.diogo.silva@gmail.com> # This file is part of structure_threader. # structure_threader is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publ...
gpl-3.0
FrederichCheng/incubator-superset
superset/connectors/druid/models.py
1
42178
# pylint: disable=invalid-unary-operand-type from collections import OrderedDict import json import logging from copy import deepcopy from datetime import datetime, timedelta from six import string_types import requests import sqlalchemy as sa from sqlalchemy import ( Column, Integer, String, ForeignKey, Text, Bo...
apache-2.0
rsepassi/tensor2tensor
tensor2tensor/data_generators/text_encoder.py
1
31307
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
hawkrobe/couzin_replication
analysis/experiment3/helpers/process_utils.py
1
42269
import pandas as pd import numpy as np import sys sys.path.append("../") sys.path.append("./helpers/") import stats import environment as env import smart_particle as inference slow_dist = 17/8.0 fast_dist = 57/8.0 lookback = 4 stay_lookback = 8*3 spin_lookback = 8 copy_threshold = lookback move_threshold = lookb...
mit
KaliLab/optimizer
optimizer/fitnessFunctions.py
1
52265
from math import fsum, sqrt from copy import copy from pyelectro import analysis from traceHandler import sizeError import efel import numpy as np import scipy import inspyred from inspyred import ec from inspyred.ec import emo from inspyred.ec import variators from inspyred.ec import observers import modelHandler impo...
lgpl-2.1
firelab/rxcadre
rxcadre/rxcadre.py
1
60581
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # # $Id$ # Project: RX Cadre Data Visualization # Purpose: RX Cadre Data Visualization interface. # Author: Kyle Shannon <kyle at pobox dot com> # Kegan Rabil <krabil@yourdata...
unlicense
Eric89GXL/numpy
numpy/lib/polynomial.py
4
38469
""" Functions to operate on polynomials. """ from __future__ import division, absolute_import, print_function __all__ = ['poly', 'roots', 'polyint', 'polyder', 'polyadd', 'polysub', 'polymul', 'polydiv', 'polyval', 'poly1d', 'polyfit', 'RankWarning'] import re import warnings import numpy.core....
bsd-3-clause
dspelaez/tools
tools/vmpy.py
1
52858
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # vim:fdm=marker # # ============================================================= # Copyright © 2017 Daniel Santiago <dpelaez@cicese.edu.mx> # Distributed under terms of the GNU/GPL license. # ============================================================...
gpl-3.0
johny-c/pylmnn
pylmnn/lmnn.py
1
50724
# coding: utf-8 """ Large Margin Nearest Neighbor Classification """ # Author: John Chiotellis <johnyc.code@gmail.com> # License: BSD 3 clause from __future__ import print_function from warnings import warn import sys import time import numpy as np from scipy.optimize import minimize from scipy.sparse import csr_mat...
bsd-3-clause
rdemolgen/snippets
PM1_plots/PM1_plotter.py
1
33836
from api import * import re, sys, subprocess, json, os, getpass import numpy as np import pandas as pd from collections import defaultdict #the purpose of this class is to model and collect the data required of a plot and then write to a file for retention and subsequent plotting hgmd_username = input("\nEnter HGMD P...
gpl-3.0
KayneWest/DeepSpeech
DeepSpeech.py
1
39848
import numpy import theano import sys import math from theano import tensor as T from theano import shared from theano.tensor.shared_randomstreams import RandomStreams from collections import OrderedDict def build_shared_zeros(shape, name): """ Builds a theano shared variable filled with a zeros numpy array """ ...
mit
IntelLabs/hpat
sdc/datatypes/hpat_pandas_dataframe_pass.py
1
64652
# ***************************************************************************** # Copyright (c) 2020, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of sou...
bsd-2-clause
phoebe-project/phoebe2
phoebe/atmospheres/passbands.py
1
187222
#from phoebe.c import h, c, k_B #from phoebe import u from phoebe import __version__ as phoebe_version from phoebe import conf, mpi from phoebe.utils import _bytes # NOTE: we'll import directly from astropy here to avoid # circular imports BUT any changes to these units/constants # inside phoebe will be ignored within...
gpl-3.0
tudarmstadt-lt/taxi
jnt/isas/taxo.py
1
34858
from re import split from collections import defaultdict import codecs from time import time import numpy as np from pandas import read_csv, Series, merge, concat from traceback import format_exc from numpy import mean import operator import re from traceback import format_exc from .isas import ISAs from .predictors i...
apache-2.0
jeremiedecock/pyai
ailib/optimize/minimizers/cutting_plane.py
1
40577
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2014,2015,2016,2017 Jeremie DECOCK (http://www.jdhp.org) # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, ...
mit
shoyer/xray
xarray/coding/cftime_offsets.py
1
36161
"""Time offset classes for use with cftime.datetime objects""" # The offset classes and mechanisms for generating time ranges defined in # this module were copied/adapted from those defined in pandas. See in # particular the objects and methods defined in pandas.tseries.offsets # and pandas.core.indexes.datetimes. # ...
apache-2.0
cycleuser/GeoPython
geopytool/CustomClass.py
1
60227
version = '0.8.19.2.1' date = '2019-2-1' dpi = 128 #coding:utf-8 from geopytool.ImportDependence import * #from geopytool.TableViewer import TableViewer class GrowingTextEdit(QtWidgets.QTextEdit): def __init__(self, *args, **kwargs): super(GrowingTextEdit, self).__init__(*args, **kwargs) sel...
gpl-3.0
ptitjano/bokeh
bokeh/charts/data_source.py
1
34236
"""The classes and functionality used to transform data inputs to consistent types.""" # ----------------------------------------------------------------------------- # Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the fil...
bsd-3-clause
snfactory/extract-star
extract_star/main.py
1
86928
# -*- coding: utf-8 -*- """ 3D PSF-based point-source extractor. The PSF is a constrained Gaussian+Moffat with elliptical distortion. Todo: * one could use Aitchison (or 'additive log-ratio') transform to enforce the normalization constraint on alphas (see http://thread.gmane.org/gmane.comp.python.scientific.use...
mit
hstau/covar-cryo
covariance/ManifoldEM_GUI.py
1
452414
from __future__ import print_function import sys, os, os.path, time, errno, psutil import csv from subprocess import call import multiprocessing import optparse time_init = time.strftime("%Y%m%d_%H%M%S") pyDir = os.path.dirname(os.path.abspath(__file__)) #python file location inputDir = os.path.join(pyDir, 'data_inpu...
gpl-2.0
parklab/NGSCheckMate
ncm_fastq.py
1
36530
import os import sys import math import subprocess, time import argparse from argparse import RawTextHelpFormatter global fastq1 global fastq2 global sub_rate global desire_depth global reference_length global pattern_length global maxthread global nodeptherror global PE global bed_file global outdir global outfilenam...
mit
renesugar/arrow
python/pyarrow/parquet.py
1
55252
# 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
cjayb/mne-python
mne/tests/test_evoked.py
1
30113
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # 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 import deepcopy import os.path as op import pickle import numpy as np fr...
bsd-3-clause
freerangehen/LSTMmusic
LSTMmusicMB.py
1
114261
############## music generation with 3 layer LSTM ###################### # # Distributed under the MIT license by Henry Ip ######################################################################## import numpy as np import matplotlib import matplotlib.pyplot as plt import matplotlib.cm as cm import math imp...
mit
winklerand/pandas
pandas/core/indexes/base.py
1
147570
import datetime import warnings import operator import numpy as np from pandas._libs import (lib, index as libindex, tslib as libts, algos as libalgos, join as libjoin, Timestamp, Timedelta, ) from pandas._libs.lib import is_datetime_array from pandas._libs.tslibs im...
bsd-3-clause
ioam/holoviews
holoviews/core/data/__init__.py
1
36064
from __future__ import absolute_import try: import itertools.izip as zip except ImportError: pass import numpy as np import param from .. import util from ..dimension import redim, Dimension, process_dimensions from ..element import Element from ..ndmapping import OrderedDict from ..spaces import HoloMap, Dy...
bsd-3-clause
OSSHealth/ghdata
workers/insight_worker/insight_worker.py
1
35224
#SPDX-License-Identifier: MIT from multiprocessing import Process, Queue from urllib.parse import urlparse import requests, sys import pandas as pd import sqlalchemy as s from sqlalchemy.ext.automap import automap_base from sqlalchemy import MetaData, and_ import statistics, logging, os, json, time import numpy as np i...
mit
LinkItONEDevGroup/LASS
LASS-Simulator/test/test_pygrib.py
1
58613
from mpl_toolkits.basemap import Basemap # import Basemap matplotlib toolkit import numpy as np import matplotlib.pyplot as plt import pygrib # import pygrib interface to grib_api def grb_to_grid(grb_obj): """Takes a single grb object containing multiple levels. Assumes same time, pressure levels. Compiles to...
mit
jshoyer/plantcv
tests/tests.py
1
83038
#!/usr/bin/env python import pytest import os import shutil import numpy as np import cv2 import plantcv as pcv import plantcv.learn # Import matplotlib and use a null Template to block plotting to screen # This will let us test debug = "plot" import matplotlib matplotlib.use('Template') TEST_DATA = os.path.join(os.p...
mit
miguel1velazquez/FJbackSPIN
PluginBackSPIN/src/bsScripts/backSPIN.py
1
37329
#!/usr/bin/pythonw # Copyright (c) 2015, Amit Zeisel, Gioele La Manno and Sten Linnarsson # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the abov...
apache-2.0
WillieMaddox/scipy
scipy/stats/morestats.py
1
92739
# Author: Travis Oliphant, 2002 # # Further updates and enhancements by many SciPy developers. # from __future__ import division, print_function, absolute_import import math import warnings from collections import namedtuple import numpy as np from numpy import (isscalar, r_, log, around, unique, asarray, ...
bsd-3-clause
SpaceKatt/CSPLN
apps/scaffolding/mac/web2py/web2py.app/Contents/Resources/lib/python2.7/matplotlib/transforms.py
2
77154
""" matplotlib includes a framework for arbitrary geometric transformations that is used determine the final position of all elements drawn on the canvas. Transforms are composed into trees of :class:`TransformNode` objects whose actual value depends on their children. When the contents of children change, their pare...
gpl-3.0
mikofski/pvlib-python
pvlib/spa.py
3
48591
""" Calculate the solar position using the NREL SPA algorithm either using numpy arrays or compiling the code to machine language with numba. """ # Contributors: # Created by Tony Lorenzo (@alorenzo175), Univ. of Arizona, 2015 import os import threading import warnings import numpy as np # this block is a way to u...
bsd-3-clause
gameduell/dask
dask/dataframe/core.py
1
137543
from __future__ import absolute_import, division, print_function from collections import Iterator from distutils.version import LooseVersion import operator from operator import getitem, setitem from pprint import pformat import uuid import warnings from toolz import merge, partial, first, unique, partition_all impor...
bsd-3-clause
themiurgo/folium
folium/folium.py
1
31048
# -*- coding: utf-8 -*- """ Folium ------- Make beautiful, interactive maps with Python and Leaflet.js """ from __future__ import absolute_import import warnings import json from folium.six import text_type, binary_type from .map import Map as _Map from .map import Icon, Marker, Popup, FitBounds from .features imp...
mit
shoyer/numpy
numpy/lib/npyio.py
1
86348
from __future__ import division, absolute_import, print_function import sys import os import re import functools import itertools import warnings import weakref import contextlib from operator import itemgetter, index as opindex import numpy as np from . import format from ._datasource import DataSource from numpy.co...
bsd-3-clause
ajdawson/numpy
numpy/core/tests/test_multiarray.py
1
189171
from __future__ import division, absolute_import, print_function import collections import tempfile import sys import os import shutil import warnings import operator import io if sys.version_info[0] >= 3: import builtins else: import __builtin__ as builtins from decimal import Decimal import numpy as np fro...
bsd-3-clause
tynn/numpy
numpy/lib/polynomial.py
5
38581
""" Functions to operate on polynomials. """ from __future__ import division, absolute_import, print_function __all__ = ['poly', 'roots', 'polyint', 'polyder', 'polyadd', 'polysub', 'polymul', 'polydiv', 'polyval', 'poly1d', 'polyfit', 'RankWarning'] import re import warnings import numpy.core....
bsd-3-clause
aw3s/PT3S
Xm.py
1
654881
""" >>> # --- >>> # Imports >>> # --- >>> import os >>> import logging >>> logger = logging.getLogger('PT3S.Xm') >>> # --- >>> # path >>> # --- >>> if __name__ == "__main__": ... try: ... dummy=__file__ ... logger.debug("{0:s}{1:s}{2:s}".format('DOCTEST: __main__ Context: ','path = os.path.di...
mit
dsm054/pandas
pandas/tests/dtypes/test_dtypes.py
1
30622
# -*- coding: utf-8 -*- import re import pytest import numpy as np import pandas as pd from pandas import ( Series, Categorical, CategoricalIndex, IntervalIndex, date_range) from pandas.core.dtypes.dtypes import ( DatetimeTZDtype, PeriodDtype, IntervalDtype, CategoricalDtype, registry, _pandas_registry) f...
bsd-3-clause
shoyer/xray
xarray/core/accessor_str.py
1
30275
# The StringAccessor class defined below is an adaptation of the # pandas string methods source code (see pd.core.strings) # For reference, here is a copy of the pandas copyright notice: # (c) 2011-2012, Lambda Foundry, Inc. and PyData Development Team # All rights reserved. # Copyright (c) 2008-2011 AQR Capital Man...
apache-2.0
e-koch/pyspeckit
pyspeckit/spectrum/plotters.py
1
35855
""" ======= Plotter ======= .. moduleauthor:: Adam Ginsburg <adam.g.ginsburg@gmail.com> """ from __future__ import print_function import matplotlib import matplotlib.figure import numpy as np import astropy.units as u import copy import inspect from astropy import log # this mess is to handle a nested hell of differe...
mit
gkunter/coquery
coquery/gui/visualizationdesigner.py
1
47579
# -*- coding: utf-8 -*- """ visualizationDesigner.py is part of Coquery. Copyright (c) 2017-2019 Gero Kunter (gero.kunter@coquery.org) Coquery is released under the terms of the GNU General Public License (v3). For details, see the file LICENSE that you should have received along with Coquery. If not, see <http://www...
gpl-3.0
biosustain/marsi
marsi/cobra/strain_design/post_processing.py
1
31850
# Copyright 2016 The Novo Nordisk Foundation Center for Biosustainability, DTU. # 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...
apache-2.0
mwengren/sensorml2iso
sensorml2iso/sensorml2iso.py
1
35374
import os import errno import io import sys from datetime import datetime, timedelta from dateutil import parser import pytz from six import iteritems try: from urllib.parse import unquote, unquote_plus, urlencode, urlparse # Python 3 except ImportError: from urllib import unquote, unquote_plus, urlencode #...
mit
jmontoyam/mne-python
mne/evoked.py
2
52037
# -*- coding: utf-8 -*- # 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 (...
bsd-3-clause
deepfield/ibis
ibis/sql/postgres/tests/test_functions.py
1
42647
import os import sys import operator import string import warnings from operator import methodcaller from datetime import date, datetime import pytest import numpy as np import ibis import ibis.expr.types as ir import ibis.expr.datatypes as dt import ibis.config as config from ibis import literal as L import pand...
apache-2.0
zorroblue/scikit-learn
sklearn/decomposition/pca.py
2
30157
""" Principal Component Analysis """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Denis A. Engemann <denis-alexander.engemann@inria.fr> # Michael Eickenberg <michael.eickenberg@inria.fr>...
bsd-3-clause
jreback/pandas
pandas/io/parsers.py
1
139632
""" Module contains tools for processing files into DataFrames or other objects """ from collections import abc, defaultdict import csv import datetime from io import StringIO import itertools import re import sys from textwrap import fill from typing import ( Any, Dict, Iterable, Iterator, List, ...
bsd-3-clause
brockk/clintrials
clintrials/dosefinding/efftox.py
1
45709
__author__ = 'Kristian Brock' __contact__ = 'kristian.brock@gmail.com' """ An implementation of Thall & Cook's EffTox design for dose-finding in clinical trials. See: Thall, P.F. and Cook, J.D. (2004). Dose-Finding Based on Efficacy-Toxicity Trade-Offs, Biometrics, 60: 684-693. Cook, J.D. Efficacy-Toxicity trade-offs...
gpl-3.0
jesserobertson/pynoddy
pynoddy/experiment/TopologyAnalysis.py
1
84153
# -*- coding: utf-8 -*- """ Created on Wed Jul 15 12:14:08 2015 @author: Sam Thiele """ import os import numpy as np import scipy as sp import math from pynoddy.experiment.MonteCarlo import MonteCarlo from pynoddy.output import NoddyTopology from pynoddy.output import NoddyOutput from pynoddy.history import NoddyHist...
gpl-2.0
ncsu-osgeorel/grass-tangible-landscape
activities.py
1
33748
# -*- coding: utf-8 -*- """ @brief activities This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details. @author: Anna Petrasova (akratoc@ncsu.edu) """ import os import imp import datetime import json import time import traceback import wx impor...
gpl-2.0
josenavas/QiiTa
qiita_db/test/test_processing_job.py
1
45880
# ----------------------------------------------------------------------------- # 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
ibis-project/ibis
ibis/backends/impala/client.py
1
59582
import io import operator import re import threading import time import traceback import weakref from collections import deque from posixpath import join as pjoin import numpy as np import pandas as pd from pkg_resources import parse_version import ibis.common.exceptions as com import ibis.expr.datatypes as dt import...
apache-2.0
SKIRT/PTS
core/basics/table.py
1
108296
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
agpl-3.0
badbytes/pymeg
gui/wx/megsubplot.py
1
43374
#!/usr/bin/env python # -*- coding: ansi_x3.4-1968 -*- # generated by wxGlade 0.6.3 on Tue Sep 29 14:21:08 2009 import wx # begin wxGlade: extracode # end wxGlade import matplotlib matplotlib.use('WXAgg') from matplotlib.figure import Figure from matplotlib.backends.backend_wxagg import \ FigureCanvasWxAgg as Fi...
gpl-3.0
mieand/kmos
kmos/run/__init__.py
1
76904
#!/usr/bin/env python """ A front-end module to run a compiled kMC model. The actual model is imported in kmc_model.so and all parameters are stored in kmc_settings.py. The model can be used directly like so:: from kmos.model import KMC_Model model = KMC_Model() model.parameters.T = 500 model.do_step...
gpl-3.0
MJuddBooth/pandas
pandas/tests/test_strings.py
1
137417
# -*- coding: utf-8 -*- # pylint: disable-msg=E1101,W0612 from datetime import datetime, timedelta import re import numpy as np from numpy import nan as NA from numpy.random import randint import pytest import pandas.compat as compat from pandas.compat import PY2, PY3, range, u from pandas import DataFrame, Index, ...
bsd-3-clause
teonlamont/mne-python
mne/io/proj.py
2
33757
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Denis Engemann <denis.engemann@gmail.com> # Teon Brooks <teon.brooks@gmail.com> # # License: BSD (3-clause) from copy import deepcopy from itertools import count from math i...
bsd-3-clause
plotly/python-api
packages/python/plotly/plotly/graph_objs/_scatter3d.py
1
89439
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scatter3d(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "scatter3d" _valid_props = { "connectgaps", "customdata", "customdatasrc", ...
mit
alephu5/Soundbyte
environment/lib/python3.3/site-packages/matplotlib/tests/test_triangulation.py
2
37456
import numpy as np import matplotlib.pyplot as plt import matplotlib.tri as mtri import matplotlib.delaunay as mdel from nose.tools import assert_equal from numpy.testing import assert_array_equal, assert_array_almost_equal,\ assert_array_less from matplotlib.testing.decorators import image_comparison import matplo...
gpl-3.0
diegocavalca/Studies
phd-thesis/nilmtk/nilmtk/metergroup.py
1
72609
from __future__ import print_function, division import warnings import gc from sys import stdout from collections import Counter from copy import copy, deepcopy from collections import namedtuple from datetime import timedelta import networkx as nx import pandas as pd import numpy as np import matplotlib.pyplot as plt...
cc0-1.0