repo_name
string
path
string
copies
string
size
string
content
string
license
string
LeeKamentsky/CellProfiler
cellprofiler/gui/viewworkspace.py
1
37483
"""ViewWorkspace.py - view the image sets and object sets in a workspace CellProfiler is distributed under the GNU General Public License. See the accompanying file LICENSE for details. Copyright (c) 2003-2009 Massachusetts Institute of Technology Copyright (c) 2009-2015 Broad Institute All rights reserved. Please s...
gpl-2.0
tkcroat/Augerquant
Modules/Auger_quantmap_functions.py
1
163314
# -*- coding: utf-8 -*- """ Created on Fri Dec 2 17:10:19 2016 @author: tkc """ import pandas as pd import numpy as np import shutil, sys, fileinput, os, math, re import matplotlib.pyplot as plt import struct from PIL import Image, ImageDraw, ImageFont # needed for jpg creation from matplotlib.backend...
mit
runt18/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/dates.py
1
33997
#!/usr/bin/env python """ Matplotlib provides sophisticated date plotting capabilities, standing on the shoulders of python :mod:`datetime`, the add-on modules :mod:`pytz` and :mod:`dateutils`. :class:`datetime` objects are converted to floating point numbers which represent the number of days since 0001-01-01 UTC. T...
agpl-3.0
cokelaer/msdas
src/msdas/readers.py
1
56969
# -*- python -*- # # This file is part of MS-DAS software # # Copyright (c) 2014 - EBI-EMBL # # File author(s): Thomas Cokelaer <cokelaer@ebi.ac.uk>, Marti Bernardo Faura # bernardo@ebi.ac.uk # # Distributed under the GPLv3 License. # See accompanying file LICENSE.txt or copy at # http://www.gnu.org/licenses...
gpl-3.0
manterd/myPhyloDB
functions/analysis/norm_graphs.py
1
46683
import datetime from django.http import HttpResponse from django_pandas.io import read_frame import json import logging from numpy import * import numpy as np from numpy.random.mtrand import RandomState import pandas as pd import pickle from pyper import * import zipfile import psutil from database.models import Sampl...
gpl-3.0
shendric/pyoval
lib/pyoval.py
1
55452
# -*- coding: utf-8 -*- # # License: GNU General Public License (GPL) v3 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
gpl-3.0
pydata/pandas-gbq
tests/system/test_gbq.py
1
60402
# -*- coding: utf-8 -*- import datetime import sys import numpy as np import pandas import pandas.api.types import pandas.util.testing as tm from pandas import DataFrame, NaT try: import pkg_resources # noqa except ImportError: raise ImportError("Could not import pkg_resources (setuptools).") import pytest ...
bsd-3-clause
JSLBen/KnowledgeTracing
codes/generate_rnn_data_split_rate_enabled_20.py
1
42778
# coding: utf-8 # In[1]: # imports import numpy as np import pandas as pd import _pickle as cPickle import random from datetime import datetime from time import time import csv from AssistmentsProperties import AssistmentsProperties # In[2]: # Assistments class for data preprocessing class DataPreprocessor(obje...
mit
tienhv/caravel
caravel/data/__init__.py
1
32248
"""Loads datasets, dashboards and slices in a new caravel instance""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import gzip import json import os import textwrap import datetime import random import pandas as pd...
apache-2.0
dssg/wikienergy
disaggregator/build/pandas/pandas/io/tests/test_excel.py
1
55943
# pylint: disable=E1101 from pandas.compat import u, range, map, openpyxl_compat from datetime import datetime, date, time import sys import os from distutils.version import LooseVersion import operator import functools import nose from numpy import nan import numpy as np from numpy.testing.decorators import slow f...
mit
chrsrds/scikit-learn
sklearn/metrics/cluster/supervised.py
2
34363
"""Utilities to evaluate the clustering performance of models. Functions named as *_score return a scalar value to maximize: the higher the better. """ # Authors: Olivier Grisel <olivier.grisel@ensta.org> # Wei LI <kuantkid@gmail.com> # Diego Molla <dmolla-aliod@gmail.com> # Arnaud Fouchet ...
bsd-3-clause
ncvanegmond/dcat
project/apicc/fetch_coinlist.py
1
39839
#!/user/bin/env python3 -tt # -*- coding: utf-8 -*- """ Module documentation. Fetch the coins currently available via CryptoCompare API https://www.cryptocompare.com/api/data/coinlist/ Notes: MPL does not handle plotting (x,y) = (x,0) values on a x,y axes system? """ # Imports import json import requests...
mit
mbaijal/incubator-mxnet
python/mxnet/model.py
1
41990
# 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
shoyer/xarray
xarray/core/computation.py
1
47711
""" Functions for applying functions that act on arrays to xarray's labeled data. """ import functools import itertools import operator from collections import Counter from typing import ( TYPE_CHECKING, AbstractSet, Any, Callable, Dict, Hashable, Iterable, List, Mapping, Optiona...
apache-2.0
ORTI3D/ORTI3D_code
iliblast/wxVisualisation.py
1
42304
#import matplotlib #matplotlib.use('WX') import matplotlib.backends.backend_wxagg import matplotlib.backends.backend_qt4agg from matplotlib.backends.backend_wx import Toolbar, StatusBarWx, FigureCanvasWx from matplotlib.backends.backend_wx import FigureManager, NavigationToolbar2Wx # on cree un FigureCanvasWxAgg et non...
gpl-3.0
TomTranter/OpenPNM
openpnm/topotools/topotools.py
1
108512
import warnings import numpy as np import scipy as sp import scipy.sparse as sprs import scipy.ndimage as spim from scipy.sparse import csgraph from scipy.spatial import ConvexHull from openpnm.utils import PrintableDict, logging, Workspace logger = logging.getLogger(__name__) ws = Workspace() def find_neighbor_sites...
mit
jseabold/statsmodels
statsmodels/regression/linear_model.py
1
113147
# TODO: Determine which tests are valid for GLSAR, and under what conditions # TODO: Fix issue with constant and GLS # TODO: GLS: add options Iterative GLS, for iterative fgls if sigma is None # TODO: GLS: default if sigma is none should be two-step GLS # TODO: Check nesting when performing model based tests, lr, wald,...
bsd-3-clause
xuewei4d/scikit-learn
sklearn/naive_bayes.py
4
49553
# -*- coding: utf-8 -*- """ The :mod:`sklearn.naive_bayes` module implements Naive Bayes algorithms. These are supervised learning methods based on applying Bayes' theorem with strong (naive) feature independence assumptions. """ # Author: Vincent Michel <vincent.michel@inria.fr> # Minor fixes by Fabian Pedre...
bsd-3-clause
zindy/Imaris
TkDialog.py
1
35443
# -*- coding: utf-8 -*- # # Copyright (c) 2013 Egor Zindy <egor.zindy@manchester.ac.uk> # # * ArrayElementVar and ArrayVar based on Bryan Oakley's code from # http://stackoverflow.com/questions/3876229/how-to-run-a-code-whenever-a-tkinter-widget-value-changes # * clean() lambda from # https://stackoverfl...
apache-2.0
bbcdli/xuexi
fenlei_tf/script_2019Nov/src/tensor_train_view.py
1
65098
# 25Apr.2016 # hy:24Jan.2017 v0.48 # Added feed augmented data online, no disk space consumption for these data # Added test_model_online, replacing previous way of viewing test accuracy online. # sudo apt-get install python-h5py # Added eva.sh to run evaluation of multiple models # Added function for evaluating multip...
apache-2.0
MJuddBooth/pandas
pandas/tests/io/test_excel.py
1
101818
from collections import OrderedDict import contextlib from datetime import date, datetime, time, timedelta from distutils.version import LooseVersion from functools import partial import os import warnings import numpy as np from numpy import nan import pytest from pandas.compat import PY36, BytesIO, iteritems, map, ...
bsd-3-clause
openego/dingo
ding0/core/network/grids.py
1
38094
"""This file is part of DING0, the DIstribution Network GeneratOr. DING0 is a tool to generate synthetic medium and low voltage power distribution grids based on open data. It is developed in the project open_eGo: https://openegoproject.wordpress.com DING0 lives at github: https://github.com/openego/ding0/ The docume...
agpl-3.0
plotly/plotly.py
packages/python/plotly/plotly/graph_objs/_scatterpolar.py
1
86746
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scatterpolar(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "scatterpolar" _valid_props = { "cliponaxis", "connectgaps", "customdata", ...
mit
anntzer/scikit-learn
sklearn/utils/tests/test_validation.py
1
48667
"""Tests for input validation functions""" import warnings import os from tempfile import NamedTemporaryFile from itertools import product from operator import itemgetter import pytest from pytest import importorskip import numpy as np import scipy.sparse as sp from sklearn.utils._testing import assert_no_warnings ...
bsd-3-clause
ENCODE-DCC/geo-submission
src/submission_script.py
1
58104
import requests import json from urllib.parse import urlsplit, urlunsplit, parse_qs import sys from time import sleep, strftime import pandas as pd import time import ast import argparse from os.path import splitext def main(): t0 = time.clock() args = get_args() # phase 1 - collect all experiments submit...
mit
yarikoptic/NiPy-OLD
nipy/neurospin/clustering/gmm.py
1
34790
""" Gaussian Mixture Model Class: contains the basic fields and methods of GMMs The class GMM _old uses C bindings which are computationally and memory efficient. Author : Bertrand Thirion, 2006-2009 """ import numpy as np import nipy.neurospin.clustering.clustering as fc class grid_descriptor(): """ A tiny ...
bsd-3-clause
mgunyho/pyspread
pyspread/src/gui/_widgets.py
1
45163
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright Martin Manns # Distributed under the terms of the GNU General Public License # -------------------------------------------------------------------- # pyspread is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
gpl-3.0
ucapdak/loewner
main/PythonTools/LoewnerRun.py
1
45908
from Constants import * import matplotlib.pyplot as plt from subprocess import check_output, CalledProcessError import matlab.engine from mpmath import findroot, cot from cmath import log from cmath import sqrt as csqrt from cmath import cos as ccos from cmath import sin as csin from math import pi, sin, floor, cos, sq...
mit
locuslab/dreaml
dreaml/dataframe/dataframe.py
1
64990
from index import Index import itertools import operator import numpy as np import scipy.sparse as sp from transform import Transform from collections import OrderedDict import networkx as nx from os.path import commonprefix from time import time from threading import Lock, Thread import json from rwlock import ReadWr...
apache-2.0
allisony/pyspeckit
pyspeckit/spectrum/models/ammonia.py
1
44703
""" ======================================== Ammonia inversion transition TROT fitter ======================================== Ammonia inversion transition TROT fitter translated from Erik Rosolowsky's http://svn.ok.ubc.ca/svn/signals/nh3fit/ .. moduleauthor:: Adam Ginsburg <adam.g.ginsburg@gmail.com> Module API ^^^...
mit
lancezlin/ml_template_py
lib/python2.7/site-packages/IPython/core/interactiveshell.py
1
132017
# -*- coding: utf-8 -*- """Main IPython class.""" #----------------------------------------------------------------------------- # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu> # Copyright (C) 2008-2011 The IPython Development Team # # Distribu...
mit
PG-TUe/tpot
tpot/base.py
1
68849
# -*- 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
bouhlelma/smt
smt/utils/kriging_utils.py
1
32172
""" Author: Dr. Mohamed A. Bouhlel <mbouhlel@umich.edu> This package is distributed under New BSD license. """ import numpy as np from packaging import version from sklearn import __version__ as sklversion if version.parse(sklversion) < version.parse("0.22"): from sklearn.cross_decomposition.pls_ import PLSRegre...
bsd-3-clause
popgengui/negui
agestrucne/pgplottingframe.py
1
40293
''' Description These classes provide tkinter frames that embed matplotlib plotting figures, with def animate to update the figure. The animate def is a wrapper for a client-supplied def. Code to create and animate was adapted from tutorial at https://pythonprogramming.net/ plotting-live-bitcoin-price-data-tkinter-...
agpl-3.0
chiralhat/mnm-python
smmesr.py
1
61053
import utility as ut import glob import re import csv import os import numpy as np import pandas as pd import scipy.optimize as sop import matplotlib.pyplot as plt from functools import partial # These regular expressions are used to extract information from the names # of the data files h_patt = '([+-]?\d+(?:\.\d+)?)...
bsd-3-clause
alpatania/MapperTools
mapper_density.py
1
32954
# MapperTools -- a Python library that computes a mapper graph # @author: Alice Patania <alice.patania@gmail.com> # # MapperTools/ from collections import defaultdict import networkx as nx from numpy import * import numpy as np import pandas as pd import matplotlib import matplotlib.pyplot as plt from .inside_mapper i...
gpl-3.0
geolovic/TProfiler
Tools/qGIS/ProfilerApp_debug.py
1
39691
# -*- coding: iso-8859-15 -*- # # ProfilerApp.py # # Copyright (C) 2017 J. Vicente Perez, Universidad de Granada # # 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 2 of the L...
gpl-3.0
nborggren/zipline
zipline/pipeline/loaders/blaze/core.py
1
36385
"""Blaze integration with the Pipeline API. For an overview of the blaze project, see blaze.pydata.org The blaze loader for the Pipeline API is designed to allow us to load data from arbitrary sources as long as we can execute the needed expressions against the data with blaze. Data Format ----------- The blaze Pip...
apache-2.0
wmvanvliet/mne-python
mne/preprocessing/ica.py
1
116197
# -*- coding: utf-8 -*- # # Authors: Denis A. Engemann <denis.engemann@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Juergen Dammers <j.dammers@fz-juelich.de> # # License: BSD (3-clause) from inspect import isfunction from collections import namedtuple from copy import deepcopy from...
bsd-3-clause
zfrenchee/pandas
pandas/tests/scalar/test_period.py
1
51446
import pytest import pytz import numpy as np from datetime import datetime, date, timedelta import pandas as pd import pandas.util.testing as tm import pandas.core.indexes.period as period from pandas.compat import text_type, iteritems from pandas.compat.numpy import np_datetime64_compat from pandas._libs import tsl...
bsd-3-clause
kevin-intel/scikit-learn
sklearn/utils/__init__.py
3
38501
""" The :mod:`sklearn.utils` module includes various utilities. """ import pkgutil import inspect from importlib import import_module from operator import itemgetter from collections.abc import Sequence from contextlib import contextmanager from itertools import compress from itertools import islice import numbers impo...
bsd-3-clause
johnson1228/pymatgen
pymatgen/analysis/adsorption.py
1
30855
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals from __future__ import absolute_import, print_function """ This module provides classes used to enumerate surface sites and to find adsorption sites on slabs "...
mit
sserkez/ocelot
cpbd/orbit_correction.py
1
32804
__author__ = 'Sergey Tomin' import pickle from time import sleep import matplotlib.pyplot as plt from numpy import diag, shape from numpy.linalg import svd from scipy.interpolate import splrep, splev from ocelot.cpbd.match import closed_orbit from ocelot.cpbd.track import * from ocelot.gui.accelerator import * impo...
gpl-3.0
bringingheavendown/numpy
numpy/lib/function_base.py
1
169122
from __future__ import division, absolute_import, print_function import collections import re import sys import warnings import numpy as np import numpy.core.numeric as _nx from numpy.core import linspace, atleast_1d, atleast_2d, transpose from numpy.core.numeric import ( ones, zeros, arange, concatenate, array, ...
bsd-3-clause
luchko/latticegraph_designer
latticegraph_designer/test/test_designer.py
1
30083
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """Very weak testing of the basic functionality using unittest and QTest""" from __future__ import division __author__ = "Ivan Luchko (luchko.ivan@gmail.com)" __version__ = "1.0a1" __date__ = "Apr 4, 2017" __copyright__ = "Copyright (c) 2017, Ivan Luchko and Project Cont...
mit
nicaogr/Style-Transfer
TransformNet.py
1
36561
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon 3 July The goal of this script is to code the Style Transfer Algorithm Inspired from https://github.com/cysmith/neural-style-tf/blob/master/neural_style.py and https://github.com/leongatys/PytorchNeuralStyleTransfer/blob/master/NeuralStyleTransfer.ipy...
gpl-3.0
akurtakov/Pydev
plugins/org.python.pydev.core/pysrc/pydevd.py
1
68108
''' Entry point module (keep at root): This module starts the debugger. ''' import sys if sys.version_info[:2] < (2, 6): raise RuntimeError('The PyDev.Debugger requires Python 2.6 onwards to be run. If you need to use an older Python version, use an older version of the debugger.') import atexit import os import...
epl-1.0
dean0x7d/pybinding
pybinding/results.py
1
36387
"""Processing and presentation of computed data Result objects hold computed data and offer postprocessing and plotting functions which are specifically adapted to the nature of the stored data. """ from copy import copy import numpy as np import matplotlib.pyplot as plt from . import pltutils from .utils import wit...
bsd-2-clause
sgenoud/scikit-learn
sklearn/linear_model/least_angle.py
1
36669
""" Least Angle Regression algorithm. See the documentation on the Generalized Linear Model for a complete discussion. """ # Author: Fabian Pedregosa <fabian.pedregosa@inria.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux # # License: BSD Style. from math import log import sys ...
bsd-3-clause
sinhrks/pandas-ml
pandas_ml/core/frame.py
1
33093
#!/usr/bin/env python import warnings import numpy as np import pandas as pd import pandas.compat as compat from pandas.util.decorators import Appender, cache_readonly from pandas_ml.compat import is_list_like from pandas_ml.core.generic import ModelPredictor, _shared_docs from pandas_ml.core.series impor...
bsd-3-clause
noelcjr/EntropyMaxima
em/tools/input_output.py
1
33090
# -*- coding: utf-8 -*- """ Created on Tue Aug 30 23:26:00 2016 @author: noel """ import sys import os import pandas as pd import Bio.PDB as struct import em.describe.utilities as utilities import em.manipulate.Molecular_Rigid_Manipulations as MRM from em.charmm.gen import * from em.charmm import run def CIF_summary(p...
gpl-3.0
OGGM/oggm
oggm/core/massbalance.py
1
50774
"""Mass-balance models""" # Built ins import logging # External libs import cftime import numpy as np import pandas as pd import netCDF4 from scipy.interpolate import interp1d from scipy import optimize as optimization # Locals import oggm.cfg as cfg from oggm.cfg import SEC_IN_YEAR, SEC_IN_MONTH from oggm.utils import...
bsd-3-clause
costypetrisor/scikit-learn
sklearn/svm/classes.py
1
37224
import warnings import numpy as np from .base import _fit_liblinear, BaseSVC, BaseLibSVM from ..base import BaseEstimator, RegressorMixin from ..linear_model.base import LinearClassifierMixin, SparseCoefMixin, \ LinearModel from ..feature_selection.from_model import _LearntSelectorMixin from ..utils import check_X...
bsd-3-clause
tox-dev/tox
tests/unit/config/test_config.py
1
123252
# coding=utf-8 import os import re import sys from textwrap import dedent import py import pytest from pluggy import PluginManager from six import PY2 import tox from tox.config import ( CommandParser, DepOption, PosargsOption, SectionReader, get_homedir, get_version_info, getcontextname, ...
mit
jseabold/statsmodels
statsmodels/genmod/tests/test_gee.py
1
77202
""" Test functions for GEE External comparisons are to R and Stata. The statsmodels GEE implementation should generally agree with the R GEE implementation for the independence and exchangeable correlation structures. For other correlation structures, the details of the correlation estimation differ among implementa...
bsd-3-clause
kgullikson88/General
GenericSearch.py
1
43790
__author__ = 'Kevin Gullikson' """ This is a general script for doing the cross-correlations in my companion search. It is called by several smaller scripts in each of the instrument-specific repositories """ import FittingUtilities import numpy as np import DataStructures import Correlate import HelperFunctions im...
gpl-3.0
cokelaer/msdas
src/msdas/annotations.py
1
33536
# -*- python -*- # # This file is part of MS-DAS software # # Copyright (c) 2014 - EBI-EMBL # # File author(s): Thomas Cokelaer <cokelaer@ebi.ac.uk>, Marti Bernardo Faura # bernardo@ebi.ac.uk # # Distributed under the GPLv3 License. # See accompanying file LICENSE.txt or copy at # http://www.gnu.org/licenses...
gpl-3.0
ashmanmode/TTSDNNRepo
src/a_addsamplefeats.py
1
58162
import cPickle import gzip import os, sys, errno import time import math import subprocess import socket # only for socket.getfqdn() # numpy & theano imports need to be done in this order (only for some numpy installations, not sure why) import numpy #import gnumpy as gnp # we need to explicitly import this in some...
apache-2.0
kevin-intel/scikit-learn
sklearn/inspection/_plot/partial_dependence.py
3
39142
import numbers from itertools import chain from math import ceil import numpy as np from scipy import sparse from scipy.stats.mstats import mquantiles from joblib import Parallel from .. import partial_dependence from ...base import is_regressor from ...utils import check_array from ...utils import check_matplotlib_s...
bsd-3-clause
fbarreir/panda-server
pandaserver/dataservice/SetupperAtlasPlugin.py
1
137605
''' setup dataset for ATLAS ''' import re import sys import time import types import urllib import hashlib import datetime import commands import threading import traceback import ErrorCode import TaskAssigner from DDM import ddm from DDM import toa from DDM import rucioAPI from dataservice.DDM import dq2Common from ...
apache-2.0
plotly/python-api
packages/python/plotly/plotly/graph_objs/_scattergeo.py
1
80462
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scattergeo(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "scattergeo" _valid_props = { "connectgaps", "customdata", "customdatasrc", ...
mit
prheenan/Research
Personal/EventDetection/_2SplineEventDetector/Detector.py
1
32582
# force floating point division. Can still use integer with // from __future__ import division # This file is used for importing the common utilities classes. import numpy as np import matplotlib.pyplot as plt import sys from scipy import signal,stats from Research.Personal.EventDetection.Util import Analysis,Plotting...
gpl-3.0
NathanWycoff/SySE
syse/syse.py
1
35031
import pandas as pd from stat_parser import Parser import re import numpy as np import unicodedata import math from pkg_resources import resource_filename ### #Syntactic Sentence Extraction (SySE) #What is sentence extraction? #Wikipedia has a pretty good description: #https://en.wikipedia.org/wiki/Sentence_extracti...
mit
aestrivex/PySurfer
surfer/viz.py
1
96471
import os from os.path import join as pjoin from warnings import warn import numpy as np from scipy import stats, ndimage, misc from matplotlib.colors import colorConverter import nibabel as nib from mayavi import mlab from mayavi.tools.mlab_scene_model import MlabSceneModel from mayavi.core.ui.api import SceneEdito...
bsd-3-clause
jakobworldpeace/scikit-learn
sklearn/tests/test_pipeline.py
1
31769
""" Test the pipeline module. """ from tempfile import mkdtemp import shutil import time import numpy as np from scipy import sparse from sklearn.externals.six.moves import zip from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_raises_regex from sklearn.utils.testing import asse...
bsd-3-clause
edusegzy/pychemqt
equipment/heatExchanger.py
1
98930
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################### # library for heat exchanger calculation # Equipment: # -Heat_Exchanger # -Heat_ExchangerDesign # -Shell_Tube # -Hairpin # -Fired_Heater #################################################...
gpl-3.0
kushalbhola/MyStuff
Practice/PythonApplication/env/Lib/site-packages/pandas/tests/indexes/test_base.py
1
100981
from collections import defaultdict from datetime import datetime, timedelta from io import StringIO import math import operator import re import numpy as np import pytest import pandas._config.config as cf from pandas._libs.tslib import Timestamp from pandas.compat import PY36 from pandas.compat.numpy import np_dat...
apache-2.0
LeKono/pyhgnc
src/pyhgnc/manager/query.py
1
40394
# -*- coding: utf-8 -*- from collections import Iterable from pandas import read_sql from . import models from .database import BaseDbManager class QueryManager(BaseDbManager): """Query interface to database.""" def _limit_and_df(self, query, limit, as_df=False): """adds a limit (limit==None := no...
apache-2.0
UASLab/ImageAnalysis
scripts/lib/matcher.py
1
64937
#!/usr/bin/python3 # put most of our eggs in the gms matching basket: # https://github.com/JiawangBian/GMS-Feature-Matcher/blob/master/python/gms_matcher.py import copy import cv2 import math from matplotlib import pyplot as plt import numpy as np import time from tqdm import tqdm import random import time from prop...
mit
hksoni/L2BM-Simulator
SimulationStatsProcessor.py
1
30839
# ***** begin license block ***** # L2BM Simulator: Lazy Load-Balancing Multicast(L2BM) simulator # copyright (c) 2016-2017, inria. # # this work was partially supported by the anr reflexion project (anr-14-ce28-0019). # the authors alone are responsible for this work. # # see the file authors for details and contact i...
gpl-3.0
zuotingbing/spark
python/pyspark/ml/clustering.py
1
60944
# # 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
ktrnka/helpers
sk.py
1
31728
from __future__ import print_function from __future__ import unicode_literals import collections import itertools import math import numbers from operator import itemgetter import numpy import pandas import scipy.optimize import scipy.stats import sklearn import sklearn.base import sklearn.linear_model import sklearn...
mit
FRESNA/PyPSA
pypsa/opf.py
1
73488
## Copyright 2015-2018 Tom Brown (FIAS), Jonas Hoersch (FIAS), David ## Schlachtberger (FIAS) ## 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 you...
gpl-3.0
kyoren/https-github.com-h2oai-h2o-3
h2o-py/h2o/h2o.py
1
82541
import warnings warnings.simplefilter('always', DeprecationWarning) import os import os.path import re import urllib import urllib2 import imp import tabulate from connection import H2OConnection from job import H2OJob from expr import ExprNode from frame import H2OFrame, _py_tmp_key, _is_list_of_lists from model impor...
apache-2.0
fraricci/pymatgen
pymatgen/io/lammps/tests/test_data.py
1
47631
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import unittest import os import random from collections import OrderedDict import gzip import json import numpy as np import pandas as pd from ruamel.yaml import YAML from pymatgen import Molecule, Element, La...
mit
phoebe-project/phoebe2
phoebe/frontend/bundle.py
1
658824
import sys import subprocess import os try: from subprocess import DEVNULL except ImportError: import os DEVNULL = open(os.devnull, 'wb') import re import json import atexit import time from datetime import datetime from distutils.version import StrictVersion from copy import deepcopy as _deepcopy import ...
gpl-3.0
eclee25/flu-SDI-exploratory-age
scripts/create_fluseverity_figs_v2/functions_v2.py
1
74050
#!/usr/bin/python ############################################## ###Python template ###Author: Elizabeth Lee ###Date: 4/24/14 ## Purpose: script of functions for data cleaning and processing to draw flu severity figures; supports figures in create_fluseverity_figs ###Command Line: would not be called from command l...
mit
pysg/pyther
IPyTherm_4.py
1
57417
# coding: utf-8 # # Importar las librerías # # In[1]: import scipy as sp from scipy import optimize from scipy.optimize import fsolve import numpy as np from matplotlib import pyplot get_ipython().magic('matplotlib inline') import pandas as pd from numpy import linalg as LA from IPython.html import widgets from IP...
mit
blaze/distributed
distributed/comm/tests/test_comms.py
1
33053
import asyncio import types from functools import partial import os import sys import threading import warnings import pkg_resources import pytest from tornado import ioloop from tornado.concurrent import Future import distributed from distributed.metrics import time from distributed.utils import get_ip, get_ipv6 fr...
bsd-3-clause
selinerguncu/Yelp-Spatial-Analysis
analysis/cleanData.py
1
31181
import pandas as pd import sqlite3 as sqlite import os from collections import defaultdict # to handle missing values while writing to the DB # class cleanData(): def importRawData(): conn = sqlite.connect('/Users/selinerguncu/Desktop/PythonProjects/Fun Projects/Yelp/data/yelpdb.sqlite') conn.text_factory = str ...
mit
ahnqirage/spark
python/pyspark/sql/tests.py
1
301042
# -*- encoding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the ...
apache-2.0
pombredanne/lizard-progress
lizard_progress/views/views.py
1
37666
# (c) Nelen & Schuurmans. GPL licensed, see LICENSE.txt. """Views for the lizard-progress app. Includes: MapView - can show projects as map layers DashboardView - shows a project's dashboard, can show graphs per area and offers CSV files for download. DashboardAreaView - a graph of the project's progr...
gpl-3.0
feranick/SpectralMachine
Archive/SpectraLearnPredict/SingleFile/SpectraLearnPredict.py
1
90299
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' ********************************************************** * * SpectraLearnPredict * Perform Machine Learning on Spectroscopy Data. * version: 20180808a * * Uses: Deep Neural Networks, TensorFlow, SVM, PCA, K-Means * * By: Nicola Ferralis <feranick@hotmail.com> * *****...
gpl-3.0
daleloogn/mython
rp_extract.py
1
39669
''' RP_extract: Rhythm Patterns Audio Feature Extractor @author: 2014-2015 Alexander Schindler, Thomas Lidy Re-implementation by Alexander Schindler of RP_extract for Matlab Matlab version originally by Thomas Lidy, based on Musik Analysis Toolbox by Elias Pampalk ( see http://ifs.tuwien.ac.at/mir/downloads.html ) ...
gpl-2.0
saopicc/killMS
Wirtinger/ClassWirtingerSolver.py
1
48987
#!/usr/bin/env python """ killMS, a package for calibration in radio interferometry. Copyright (C) 2013-2017 Cyril Tasse, l'Observatoire de Paris, SKA South Africa, Rhodes University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published ...
gpl-2.0
sstoma/CellProfiler
cellprofiler/gui/cpframe.py
1
88303
# -*- Encoding: utf-8 -*- """ CellProfiler.CellProfilerGUI.CPFrame - Cell Profiler's main window CellProfiler is distributed under the GNU General Public License. See the accompanying file LICENSE for details. Copyright (c) 2003-2009 Massachusetts Institute of Technology Copyright (c) 2009-2015 Broad Institute All ri...
gpl-2.0
louispotok/pandas
pandas/core/strings.py
1
88762
import numpy as np from pandas.compat import zip from pandas.core.dtypes.generic import ABCSeries, ABCIndex from pandas.core.dtypes.missing import isna, notna from pandas.core.dtypes.common import ( is_bool_dtype, is_categorical_dtype, is_object_dtype, is_string_like, is_list_like, is_scalar, ...
bsd-3-clause
joferkington/numpy
numpy/linalg/linalg.py
1
75796
"""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
anaderi/lhcb_trigger_ml
hep_ml/reports.py
1
31998
# About # This module contains functions to build reports: # training, getting predictions, # building various plots, calculating metrics from __future__ import print_function, division, absolute_import from itertools import islice from collections import OrderedDict import time import warnings import numpy import p...
mit
OSSHealth/ghdata
augur/metrics/pull_request.py
1
58895
#SPDX-License-Identifier: MIT """ Metrics that provide data about pull requests & their associated activity """ import datetime import sqlalchemy as s import pandas as pd from augur.util import register_metric @register_metric() def pull_requests_merge_contributor_new(self, repo_group_id, repo_id=None, period='day', ...
mit
dblalock/dig
tests/exper_bits2.py
1
56718
#!/usr/bin/env python import functools import matplotlib.pyplot as plt import numpy as np import seaborn as sb import time from collections import namedtuple from scipy import stats from sklearn.decomposition import TruncatedSVD import datasets import files import product_quantize as pq import pyience as pyn from u...
mit
dmitriz/zipline
tests/test_assets.py
1
42384
# # Copyright 2015 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
apache-2.0
JeanOlivier/pyHegel
pyHegel/gen_poly.py
1
30253
# -*- coding: utf-8 -*- ########################## Copyrights and license ############################ # # # Copyright 2011-2015 Christian Lupien <christian.lupien@usherbrooke.ca> # # ...
gpl-3.0
nmartensen/pandas
pandas/tests/frame/test_analytics.py
1
78745
# -*- coding: utf-8 -*- from __future__ import print_function from datetime import timedelta from distutils.version import LooseVersion import sys import pytest from string import ascii_lowercase from numpy import nan from numpy.random import randn import numpy as np from pandas.compat import lrange, product from p...
bsd-3-clause
jeromecn/caravel_viz_full
caravel/models.py
1
88506
"""A collection of ORM sqlalchemy models for Caravel""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import OrderedDict import functools import json import logging import pickle import re import tex...
apache-2.0
KayneWest/DeepSpeech
rnntest.py
1
37106
from __future__ import division import numpy as np import os, wave, struct import numpy as np import subprocess import re from itertools import chain from multiprocessing import cpu_count, Pool import numpy, theano, sys, math from theano import tensor as T from theano import shared from theano.tensor.signal import down...
mit
fabioz/Pydev
plugins/org.python.pydev.core/pysrc/tests_python/test_debugger.py
1
170620
# coding: utf-8 ''' The idea is that we record the commands sent to the debugger and reproduce them from this script (so, this works as the client, which spawns the debugger as a separate process and communicates to it as if it was run from the outside) Note that it's a python script but it'll spawn a ...
epl-1.0
dialounke/pylayers
pylayers/gis/layout.py
1
374725
# -*- coding: utf-8 -*- # # # LAYOUT Module # # # """ .. currentmodule:: pylayers.gis.layout .. autosummary:: """ from __future__ import print_function try: from tvtk.api import tvtk from mayavi import mlab except: print('Layout:Mayavi is not installed') import pdb import sys import os import logging i...
mit
jbrundle/earthquake-forecasts
EQMethods_backup_2016-04-12.py
1
43702
#!/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
joewandy/pyBatman
pyBatman/pipeline.py
1
36491
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import datetime import tempfile import shutil import copy import cPickle from collections import OrderedDict from distutils.dir_util import copy_tree from random import randint import multiprocessing import json import numpy as np import nmrglue as ng import pan...
gpl-3.0