repo_name
string
path
string
copies
string
size
string
content
string
license
string
PXke/invenio
invenio/legacy/webstat/engine.py
1
105780
## This file is part of Invenio. ## Copyright (C) 2007, 2008, 2010, 2011, 2013 CERN. ## ## Invenio 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 ## License, or (at your option) any ...
gpl-2.0
iproduct/course-social-robotics
11-dnn-keras/venv/Lib/site-packages/matplotlib/image.py
1
66954
""" The image module supports basic image loading, rescaling and display operations. """ import math import os import logging from numbers import Number from pathlib import Path import numpy as np import PIL.PngImagePlugin import matplotlib as mpl import matplotlib.artist as martist from matplotlib.backend_bases imp...
gpl-2.0
thesuperzapper/tensorflow
tensorflow/contrib/learn/python/learn/estimators/estimator.py
1
55175
# 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
fashandge/deja
src/experiment/utilities.py
1
31043
import os import re import itertools import time import datetime import string import random import nltk import toolz from nltk.corpus import wordnet as wn #from nltk.corpus import verbnet as vn #from nltk.corpus import framenet as fn from nltk.stem import WordNetLemmatizer from nltk.tag.stanford import POSTagger from ...
mit
davidwaroquiers/pymatgen
pymatgen/io/gaussian.py
1
59149
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module implements input and output processing from Gaussian. """ import re import warnings import numpy as np import scipy.constants as cst from monty.io import zopen from pymatgen.core.composition ...
mit
pombredanne/metamorphosys-desktop
metamorphosys/META/analysis_tools/PYTHON_RICARDO/output_transportability/scripts/transportability.py
1
36628
""" Vehicle geometry (CAD) test bench: Assess what types of transports the design will fit into. Also evaluates whether lift eyes and tiedowns can support the expected loads. """ import _winreg import sys import os from scipy.spatial import ConvexHull import numpy as np def query_analysis_tools():...
mit
JWarmenhoven/seaborn
seaborn/tests/test_categorical.py
1
91576
import numpy as np import pandas as pd import scipy from scipy import stats, spatial import matplotlib as mpl import matplotlib.pyplot as plt from distutils.version import LooseVersion import nose.tools as nt import numpy.testing as npt from numpy.testing.decorators import skipif from . import PlotTestCase from .. i...
bsd-3-clause
h2oai/h2o-dev
h2o-py/h2o/h2o.py
1
72871
# -*- encoding: utf-8 -*- """ h2o -- module for using H2O services. :copyright: (c) 2016 H2O.ai :license: Apache License Version 2.0 (see LICENSE for details) """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import os import warnings import webbrowser import type...
apache-2.0
jbloom/mapmuts
src/plot.py
1
104900
"""Module for performing plotting for ``mapmuts`` package. This module uses ``pylab`` and ``matplotlib`` to make plots. These plots will fail if ``pylab`` and ``matplotlib`` are not available for importation. Before running any function in this module, you can run the `PylabAvailable` function to determine if ``pylab`...
gpl-3.0
mattvonrocketstein/smash
smashlib/ipy3x/core/interactiveshell.py
1
137505
# -*- 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
drnesr/NeuroCharter
NeuroCharter.py
1
326518
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import print_function import collections import copy import csv import itertools import math import os import random import re import shelve import sys import time from datetime import datetime as dt from datetime import timedelta from subp...
mit
beiko-lab/gengis
bin/Lib/site-packages/numpy/linalg/linalg.py
1
64922
"""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...
gpl-3.0
desihub/desispec
py/desispec/bootcalib.py
1
66424
""" desispec.bootcalib ================== Utility functions to perform a quick calibration of DESI data TODO: 1. Expand to r, i cameras 2. QA plots 3. Test with CR data """ from __future__ import print_function, absolute_import, division import numpy as np import copy import pdb import yaml import glob import math i...
bsd-3-clause
yugangzhang/chxanalys
chxanalys/chx_specklecp.py
1
63147
""" X-ray speckle visibility spectroscopy(XSVS) - Dynamic information of the speckle patterns are obtained by analyzing the speckle statistics and calculating the speckle contrast in single scattering patterns. This module will provide XSVS analysis tools """ from __future__ import (absolute_import, division, print_fu...
bsd-3-clause
hughests/decon1d
decon_3.0.py
1
102926
from __future__ import print_function from __future__ import division from builtins import zip from builtins import range from past.utils import old_div import numpy as n import seaborn as sns import sys import random import pylab as p import math as m from matplotlib.backends.backend_pdf import PdfPages import scipy.s...
lgpl-3.0
jmontoyam/mne-python
mne/viz/utils.py
2
58984
"""Utility functions for plotting M/EEG data """ from __future__ import print_function # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # ...
bsd-3-clause
geomf/omf-fork
omf/milToGridlab.py
1
79845
# Portions Copyright (C) 2015 Intel Corporation ''' Convert a Milsoft Windmil feeder model into an OMF-compatible version. ''' import feeder import csv import random import math import copy from StringIO import StringIO import logging from omf.common.plot import Plot logger = logging.getLogger(__name__) def convert...
gpl-2.0
aidan-cfse/CPACS2SUMO
CPACS2SUMO/CPACS2SUMO.py
1
35331
#=============================================================================== # Script to convert CPACS file geometry into SUMO geometry # Works with Python 2.7 # Author : Aidan Jungo # Date of creation: 2017-03-03 #================================== # ---Input--- # CPACS file # ---Output--- # SUMO file #==========...
apache-2.0
uvchik/pvlib-python
pvlib/solarposition.py
1
36763
""" Calculate the solar position using a variety of methods/packages. """ # Contributors: # Rob Andrews (@Calama-Consulting), Calama Consulting, 2014 # Will Holmgren (@wholmgren), University of Arizona, 2014 # Tony Lorenzo (@alorenzo175), University of Arizona, 2015 from __future__ import division import os import da...
bsd-3-clause
BigDataforYou/movie_recommendation_workshop_1
big_data_4_you_demo_1/venv/lib/python2.7/site-packages/pandas/core/frame.py
1
208315
""" 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...
mit
google/or-tools
examples/python/cvrptw_plot.py
1
30119
# This Python file uses the following encoding: utf-8 # Copyright 2015 Tin Arm Engineering AB # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
apache-2.0
timovanopstal/nutils
nutils/function.py
1
107226
# -*- coding: utf8 -*- # # Module FUNCTION # # Part of Nutils: open source numerical utilities for Python. Jointly developed # by HvZ Computational Engineering, TU/e Multiscale Engineering Fluid Dynamics, # and others. More info at http://nutils.org <info@nutils.org>. (c) 2014 """ The function module defines the :clas...
mit
toobaz/pandas
pandas/tests/io/pytables/test_pytables.py
2
195267
from contextlib import contextmanager import datetime from datetime import timedelta from distutils.version import LooseVersion from io import BytesIO import os import re import tempfile from warnings import catch_warnings, simplefilter import numpy as np import pytest from pandas.compat import PY36, is_platform_litt...
bsd-3-clause
lthurlow/Network-Grapher
proj/external/matplotlib-1.2.1/build/lib.linux-i686-2.7/matplotlib/backends/backend_tkagg.py
2
34663
# Todd Miller jmiller@stsci.edu from __future__ import division, print_function import os, sys, math import os.path import Tkinter as Tk, FileDialog # Paint image to Tk photo blitter extension import matplotlib.backends.tkagg as tkagg from matplotlib.backends.backend_agg import FigureCanvasAgg import matplotlib....
mit
dssg/wikienergy
disaggregator/build/pandas/pandas/io/tests/test_parsers.py
1
135338
# -*- coding: utf-8 -*- # pylint: disable=E1101 from datetime import datetime import csv import os import sys import re import nose import platform from numpy import nan import numpy as np from pandas.io.common import DtypeWarning from pandas import DataFrame, Series, Index, MultiIndex, DatetimeIndex from pandas.com...
mit
plotly/plotly.py
packages/python/plotly/plotly/graph_objs/_pointcloud.py
1
49878
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Pointcloud(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "pointcloud" _valid_props = { "customdata", "customdatasrc", "hoverinfo", ...
mit
ddempsey/PyFEHM
fgrid.py
1
64942
"""For manipulating FEHM grids.""" """ Copyright 2013. Los Alamos National Security, LLC. This material was produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos National Laboratory (LANL), which is operated by Los Alamos National Security, LLC for the U.S. Department of Energy. The U.S. Governme...
lgpl-2.1
mikestock/intf-tools
intf_tools.py
1
66842
#!/usr/bin/python """intf_toos The main shared library for interferometer processing type operations. Included toos for displaying, processing and simulating lightning interferometer type data. """ ######## # Written by Michael Stock, 2012 # versions: # the intf_tools version must match intf_process for processi...
gpl-2.0
winklerand/pandas
pandas/tests/io/formats/test_to_html.py
1
48020
# -*- coding: utf-8 -*- import re from textwrap import dedent from datetime import datetime from distutils.version import LooseVersion import pytest import numpy as np import pandas as pd from pandas import compat, DataFrame, MultiIndex, option_context, Index from pandas.compat import u, lrange, StringIO from pandas....
bsd-3-clause
cactusbin/nyt
matplotlib/lib/matplotlib/tri/triinterpolate.py
1
65588
""" Interpolation inside triangular grids. """ from __future__ import print_function from matplotlib.tri import Triangulation from matplotlib.tri.trifinder import TriFinder from matplotlib.tri.tritools import TriAnalyzer import numpy as np import warnings __all__ = ('TriInterpolator', 'LinearTriInterpolator', 'CubicTr...
unlicense
danielhanchen/sciblox
sciblox/sciblox.py
1
73696
#------------- Daniel Han-Chen 2017 #------------- https://github.com/danielhanchen/sciblox #------------- SciBlox v0.2.8 #------------- maxcats = 15 import warnings warnings.filterwarnings("ignore") true = True; TRUE = True false = False; FALSE = False #----------------------------- import pandas as pd, numpy as np,...
mit
dssg/homelessness-public
clean.py
2
54867
"""The cleaning module. Really the only method that's important for a user to know about is :func:`load`. :func:`clean` is used to clean raw data into `clean/`, but is wrapped by `make`, (see `Makefile` and `README` for more info`). There are several functions that operate on `master`, and they all function on `mast...
mit
JudoWill/ResearchNotebooks
CanabHIVDAnalysis.py
1
36686
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <headingcell level=1> # Cannabinoid Effect on HIVD score # <markdowncell> # Here I am looking to find the effect of Cannabinoid Use on HIVD score. HIVD score is a value that ranges from 0-12 with anything below 10 marking 'impaired' and >=10 implying not impaired...
mit
GuessWhoSamFoo/pandas
pandas/core/resample.py
1
58002
import copy from datetime import timedelta from textwrap import dedent import warnings import numpy as np from pandas._libs import lib from pandas._libs.tslibs import NaT, Timestamp from pandas._libs.tslibs.frequencies import is_subperiod, is_superperiod from pandas._libs.tslibs.period import IncompatibleFrequency im...
bsd-3-clause
Didou09/tofu
tofu/data/_core_new.py
1
41066
# -*- coding: utf-8 -*- # Built-in import sys import os # import itertools as itt import copy import warnings from abc import ABCMeta, abstractmethod import inspect # Common import numpy as np import scipy.interpolate as scpinterp # import matplotlib.pyplot as plt # from matplotlib.tri import Triangulation as mplTri ...
mit
jrg365/gpytorch
examples/LBFGS.py
1
42604
import torch import numpy as np import matplotlib.pyplot as plt from functools import reduce from copy import deepcopy from torch.optim import Optimizer def is_legal(v): """ Checks that tensor is not NaN or Inf. Inputs: v (tensor): tensor to be checked """ legal = not torch.isnan(v).any(...
mit
dwettstein/pattern-recognition-2016
mlp/gaussian_process/gaussian_process.py
1
35002
# -*- coding: utf-8 -*- # Author: Vincent Dubourg <vincent.dubourg@gmail.com> # (mostly translation, see implementation details) # Licence: BSD 3 clause from __future__ import print_function import numpy as np from scipy import linalg, optimize from sklearn.base import BaseEstimator, RegressorMixin from skl...
mit
roshantha9/AbstractManycoreSim
src/libApplicationModel/AdaptiveGoPGenerator_v2.py
1
59507
import pprint import sys, os import math, random import numpy as np import copy import csv import bisect import json import itertools from operator import itemgetter import networkx as nx import operator import time, timeit from collections import Counter, Sequence from collections import OrderedDict import matplotli...
gpl-3.0
qbilius/conv-exp
base.py
1
34655
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os, glob import shutil, io, urllib, zipfile # for downloading datasets import pickle from collections import OrderedDict import numpy as np import scipy.stats im...
gpl-3.0
BigDataforYou/movie_recommendation_workshop_1
big_data_4_you_demo_1/venv/lib/python2.7/site-packages/pandas/core/internals.py
1
169308
import copy import itertools import re import operator from datetime import datetime, timedelta, date from collections import defaultdict import numpy as np from numpy import percentile as _quantile from pandas.core.base import PandasObject from pandas.core.common import (_possibly_downcast_to_dtype, isnull, _NS_DTY...
mit
bnaul/scikit-learn
sklearn/model_selection/_validation.py
1
65629
""" 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> # Raghav RV <rvraghav93@gma...
bsd-3-clause
cossatot/slip_rate_calculator
slip_rate_tools/slip_rate_tools.py
1
38647
# -*- coding: utf-8 -*- from __future__ import division import time from collections import OrderedDict import itertools import ast import numpy as np import numpy.ma as ma #import Splines #from Splines import spline1d from scipy.interpolate import interp1d from scipy.optimize import minimize, curve_fit, le...
mit
dssg/wikienergy
disaggregator/build/pandas/pandas/tools/tests/test_merge.py
1
91226
# pylint: disable=E1103 import nose from datetime import datetime from numpy.random import randn from numpy import nan import numpy as np import random import pandas as pd from pandas.compat import range, lrange, lzip, zip, StringIO from pandas import compat from pandas.tseries.index import DatetimeIndex from pandas...
mit
wkiri/DEMUD
demud/dataset_mastcam.py
1
42501
#!/usr/bin/env python # File: dataset_kepler.py # Author: James Bedell, 2014-06-27 # # Kepler data set reader and plotter for light curves # # Copyright 2013-2015, by the California Institute of Technology. ALL # RIGHTS RESERVED. United States Government Sponsorship # acknowledged. Any commercial use must be negotiate...
apache-2.0
yugangzhang/chxanalys
chxanalys/PhaseRetrieval.py
1
33348
""" Phase Retrieval Codes for NSLS-II Coherent Hard X-ray beamline Adapted from: M180G Phase Retrieval Author: AJ Pryor Jianwei (John) Miao Coherent Imaging Group University of California, Los Angeles Copyright (c) 2016. All Rights Reserved. Modified by: Yuan Hung Lo (2017) """ from PIL import Imag...
bsd-3-clause
Hugo1991/TFM
genetic.py
1
38934
import networkx as nx import random as rnd import matplotlib.pyplot as plt import numpy as np import multiprocessing as mp from numpy import sqrt from enum import Enum class execution_type(Enum): static_part1 = 0 static_part2 = 1 static = 2 dynamic = 3 class weight_edges(Enum): linear = 0 ...
apache-2.0
rs2/pandas
pandas/_vendored/typing_extensions.py
1
85690
""" vendored copy of typing_extensions, copied from https://raw.githubusercontent.com/python/typing/master/typing_extensions/src_py3/typing_extensions.py on 2020-08-30. typing_extensions is distributed under the Python Software Foundation License. This is not a direct copy/paste of the original file. Changes are: ...
bsd-3-clause
notestaff/cosi
cosi/trajsim.py
1
146961
#!/usr/bin/env python # # $File: utils.py $ # $LastChangedDate: 2015-04-03 16:50:47 -0500 (Fri, 03 Apr 2015) $ # $Rev: 4962 $ # # This file is part of simuPOP, a forward-time population genetics # simulation environment. Please visit http://simupop.sourceforge.net # for details. # # Copyright (C) 2004 - 2010 Bo Peng (...
gpl-3.0
rs2/pandas
pandas/tests/reshape/test_melt.py
1
37168
import numpy as np import pytest import pandas as pd from pandas import DataFrame, lreshape, melt, wide_to_long import pandas._testing as tm class TestMelt: def setup_method(self, method): self.df = tm.makeTimeDataFrame()[:10] self.df["id1"] = (self.df["A"] > 0).astype(np.int64) self.df["...
bsd-3-clause
C0rvus/iAMA_Reddit_Bachelor
python/a_thread_lifespan_n_average_commenttime.py
1
36470
# Sources used within this class: # 1. (27.02.2016 @ 14:22) - # https://stackoverflow.com/questions/20214497/annoying-white-space-in-bar-chart-matplotlib-python # 2. (27.02.2016 @ 16:30) - # http://www.programiz.com/python-programming/break-continue # 3. (26.03.2016 @ 18:03) - # https://stackoverflow.com/questions/1240...
gpl-3.0
chrisdjscott/Atoman
atoman/gui/dialogs/simpleDialogs.py
1
34621
# -*- coding: utf-8 -*- """ Additional dialogs. @author: Chris Scott """ from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import os import copy import logging from PySide2 import QtGui, QtCore, QtWidgets import numpy as np import math as math fro...
mit
barnabytprowe/great3-public
great3sims/galaxies.py
1
51950
# Copyright (c) 2014, the GREAT3 executive committee (http://www.great3challenge.info/?q=contacts) # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted # provided that the following conditions are met: # # 1. Redistributions of source code must retain...
bsd-3-clause
kejbaly2/metrique
metrique/utils.py
1
48169
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # Author: "Chris Ward" <cward@redhat.com> ''' metrique.utils ~~~~~~~~~~~~~~ This module contains utility functions shared between metrique sub-modules. ''' from __future__ import unicode_literals, absolute_import imp...
gpl-3.0
BursonLab/Silica-Coding-Project
centerFinder.py
1
54259
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 19 14:48:58 2018 @author: danwall & thomasmarsh """ import math import numpy import matplotlib matplotlib.use('TkAgg') from skimage import io from skimage import feature from skimage import draw from skimage import util from skimage import color...
apache-2.0
Silmathoron/NNGT
nngt/plot/animations.py
1
35919
#!/usr/bin/env python #-*- coding:utf-8 -*- # # This file is part of the NNGT project to generate and analyze # neuronal networks and their activity. # Copyright (C) 2015-2019 Tanguy Fardet # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
gpl-3.0
flohorovicic/pynoddy
pynoddy/experiment/__init__.py
1
33480
''' Base class from which PyNoddy experiments should inherit. Much basic functionality (random perturbation, plotting etc. is defined here). Thought: perhaps drawing functions etc. should be moved into NoddyOutput class? @author: flohorovicic, samthiele ''' import os import numpy as np import matplotlib.pyplot as pl...
gpl-2.0
bosscha/alma-calibrator
src/lines/calibratorLines.py
1
35358
""" This program aims to detect lines in ALMA calibratos: - Extract the spw from the calibrators - analyze the spectra (wavelet filtering, etc) - give a scoring from the presence of lines - produce plots of the spw HISTORY: 2014.06.05: - first shot 2014.06.06: - create report -...
gpl-2.0
Kleptobismol/scikit-bio
skbio/stats/ordination/tests/test_ordination.py
1
36272
# ---------------------------------------------------------------------------- # 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
bdh1011/wau
venv/lib/python2.7/site-packages/pandas/core/series.py
1
89831
""" Data structure for 1-dimensional cross-sectional and time series data """ from __future__ import division # pylint: disable=E1101,E1103 # pylint: disable=W0703,W0622,W0613,W0201 import types import warnings from numpy import nan, ndarray import numpy as np import numpy.ma as ma from pandas.core.common import (i...
mit
dhruve/spark
python/pyspark/sql/dataframe.py
1
73144
# # 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
genialis/resolwe-bio
resolwe_bio/tests/processes/test_upload.py
1
34059
import os from pathlib import Path from resolwe.flow.models import Data from resolwe.test import tag_process, with_resolwe_host from resolwe_bio.utils.test import KBBioProcessTestCase, skipUnlessLargeFiles class UploadProcessorTestCase(KBBioProcessTestCase): @tag_process("upload-bam", "upload-bam-indexed") ...
apache-2.0
runawayhorse001/LearningApacheSpark
pyspark/sql/session.py
1
36222
# # 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...
mit
krischer/LASIF
lasif/colors.py
1
55414
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Colors and colormaps for plotting. :copyright: Lion Krischer (krischer@geophysik.uni-muenchen.de), 2015 :license: GNU General Public License, Version 3 (http://www.gnu.org/copyleft/gpl.html) """ from matplotlib.colors import LinearSegmentedColormap # Prett...
gpl-3.0
dricciardelli/vae2vec
vae_def_oh.py
1
37009
''' Significant lifting from https://jmetzen.github.io/2015-11-27/vae.html ''' import time import numpy as np import tensorflow as tf from tensorflow.python.ops import rnn import random import matplotlib.pyplot as plt import re, string from sklearn.feature_extraction.text import CountVectorizer from collections impo...
mit
3DGenomes/tadbit
_pytadbit/utils/extraviews.py
1
56664
""" 06 Aug 2013 """ from warnings import warn from subprocess import Popen from itertools import product import numpy as np from scipy import interpolate try: from matplotlib.ticker import MultipleLocator from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D ...
gpl-3.0
evanthebouncy/nnhmm
graph4/saved_graph.py
1
39016
import networkx as nx import matplotlib.pyplot as plt from graph import * G_V = [(0.3464278051698345, 0.01071151392083236), (0.18646481364992717, 0.7424897440715547), (0.6814995915623083, 0.03346594836609995), (0.46692555934829993, 0.1068926497928443), (0.8289230447367343, 0.6184911598073255), (0.6089151825983125, 0.8...
mit
icexelloss/arrow
python/pyarrow/tests/test_array.py
1
36308
# 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
classner/spearmint-win
GPConstrainedEIChooser.py
2
54583
## # Copyright (C) 2012 Jasper Snoek, Hugo Larochelle and Ryan P. Adams # # This code is written for research and educational purposes only to # supplement the paper entitled # "Practical Bayesian Optimization of Machine Learning Algorithms" # by Snoek, Larochelle and Adams # Advances in Neural Information Processing...
gpl-3.0
neuropoly/spinalcordtoolbox
spinalcordtoolbox/centerline/nurbs.py
1
48551
#!/usr/bin/env python # @package nurbs # Approximate a 3D curve with a B-Spline curve from either a set of data points or a set of control points # # If a set of data points is given, it generates a B-spline that either approximates the curve in the least square # sense or interpolates the curve. It also computes the ...
mit
trueyao/spark-lever
python/pyspark/sql/dataframe.py
2
36076
# # 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
boada/redshiftCode
ifu_visualTemplateRedshift5.py
1
58695
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Moving sky plot to bottom of object spectrum plot, added badlines # stuff,restricted z range # for cross correlation to slider z +/-0.3 # # Adding xcsao button - need shady iraf import shenanigans, otherwise iraf # causes feedback between tk # widgets and variables to n...
mit
ratnania/pigasus
python/fem/basicPDE.py
1
53168
# -*- coding: UTF-8 -*- #! /usr/bin/python import sys import numpy as np from scipy.sparse.linalg import cg as ConjugateGradient from caid.cad_geometry import cad_geometry from caid.cad_geometry import entier_vers_couple as face_to_bc from .constants import * from .field import * from .norm import * from .grids impor...
mit
enricopal/STEM
src/STEM.py
1
34025
import os import numpy as np import pandas as pd import subprocess import optparse from collections import Counter from sklearn.svm import SVC #from sklearn import model_selection from sklearn import model_selection from sklearn.externals import joblib import stacking_create_training_set import xml.etree.ElementTree as...
apache-2.0
dgary50/eovsa
solpnt.py
1
33295
''' Module for accessing, analyzing and plotting SOLPNTCAL data''' # # History: # 2014-Nov-29 DG # Extensive changes to utilize SQL database. Also made gausfit() # routine more general. # 2014-Dec-02 DG # Completed new routines find_solpnt(), get_solpnt(), and renamed # the older routines ...
gpl-2.0
bthirion/scikit-learn
sklearn/linear_model/coordinate_descent.py
2
82307
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Gael Varoquaux <gael.varoquaux@inria.fr> # # License: BSD 3 clause import sys import warnings from abc import ABCMeta, abstractmethod import n...
bsd-3-clause
anntzer/scikit-learn
sklearn/metrics/pairwise.py
5
69978
# -*- coding: utf-8 -*- # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Robert Layton <robertlayton@gmail.com> # Andreas Mueller <amueller@ais.uni-bonn.de> # Philippe Gervais <philippe.gervais@inria.fr> # Lars Buitinck ...
bsd-3-clause
HesselTjeerdsma/Cyber-Physical-Pacman-Game
Algor/flask/lib/python2.7/site-packages/tqdm/_tqdm.py
1
44456
""" Customisable progressbar decorator for iterators. Includes a default (x)range iterator printing to stderr. Usage: >>> from tqdm import trange[, tqdm] >>> for i in trange(10): #same as: for i in tqdm(xrange(10)) ... ... """ from __future__ import absolute_import # integer division / : float, // : int from...
apache-2.0
plotly/python-api
packages/python/plotly/plotly/graph_objs/layout/polar/_radialaxis.py
1
83464
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class RadialAxis(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.polar" _path_str = "layout.polar.radialaxis" _valid_props = { "angle",...
mit
scienceguyrob/SKA-TestVectorGenerationPipeline
Deploy/pulsar_injection_pipeline/src/CandidateParGenerator.py
2
74370
## @package PARS # A module used to create Tempo2 compatible par files. # # Author: Rob Lyon # Email : robert.lyon@manchester.ac.uk # web : www.scienceguyrob.com # Start normal non-doxygen docstring... """ ************************************************************************** | ...
gpl-3.0
tkcroat/Augerquant
Development/Auger_integquant_functions_11Nov16backup.py
1
64350
# -*- coding: utf-8 -*- """ Created on Wed May 11 08:08:52 2016 @author: tkc """ import re from collections import defaultdict import pandas as pd import numpy as np import scipy import scipy.stats from scipy import optimize from math import factorial # used by Savgol matrix from scipy.optimize import cu...
mit
CompPhysics/MachineLearning
doc/src/LectureNotes/_build/jupyter_execute/chapter7.py
1
38533
# Support Vector Machines, overarching aims A Support Vector Machine (SVM) is a very powerful and versatile Machine Learning method, capable of performing linear or nonlinear classification, regression, and even outlier detection. It is one of the most popular models in Machine Learning, and anyone interested in Machi...
cc0-1.0
rsheftel/raccoon
raccoon/series.py
1
32944
""" Series class """ from abc import ABC, abstractmethod from bisect import bisect_left, bisect_right from collections import OrderedDict from itertools import compress from tabulate import tabulate from raccoon.sort_utils import sorted_exists, sorted_index, sorted_list_indexes class SeriesBase(ABC): """ Ba...
mit
jreback/pandas
pandas/tests/arithmetic/test_datetime64.py
1
91671
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. # Specifically for datetime64 and datetime64tz dtypes from datetime import datetime, time, timedelta from itertools import product, starmap import operator import warnings import numpy as np import pytest import pytz from pa...
bsd-3-clause
NicWayand/xray
xarray/test/test_backends.py
1
44435
from io import BytesIO from threading import Lock import contextlib import itertools import os.path import pickle import shutil import tempfile import unittest import sys import numpy as np import pandas as pd import xarray as xr from xarray import Dataset, open_dataset, open_mfdataset, backends, save_mfdataset from ...
apache-2.0
foolcage/fooltrader
fooltrader/api/fundamental.py
1
51633
# -*- coding: utf-8 -*- import logging import os import pandas as pd from fooltrader.api.event import get_report_event_date from fooltrader.api.technical import to_security_item from fooltrader.contract.files_contract import get_balance_sheet_path, get_income_statement_path, \ get_cash_flow_statement_path, get_f...
mit
CovingtonResearchGroup/olm
olm/calcite.py
1
54675
##################################################################### ## Functions related to water chemistry and dissolution of Calcite ## ##################################################################### import numpy as np import pandas from .general import * from scipy.optimize import brentq#, fminbound from sc...
mit
tum-camp/survival-support-vector-machine
tests/test_survival_svm.py
1
33595
import unittest from functools import partial from os.path import join, dirname import numpy from numpy.testing import TestCase, run_module_suite, assert_array_almost_equal, assert_array_equal from sklearn.decomposition import KernelPCA from sklearn.metrics import mean_squared_error from survival.bintrees import AVLT...
gpl-3.0
sauloal/cnidaria
scripts/venv/lib/python2.7/site-packages/pandas/core/frame.py
1
191442
""" 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...
mit
buguen/pylayers
pylayers/antprop/rays.py
1
113792
#!/usr/bin/python # -*- coding: latin1 -*- """ Class Rays ========== This modules contains Rays class .. autosummary:: :toctree: generated Rays.__init__ Rays.__len__ Rays.__repr__ Rays.sort Rays.extract Rays.mirror Rays.to3D Rays.locbas Rays.fillinter Rays.length Rays...
lgpl-3.0
glennhickey/teHmm
basehmm.py
1
32410
#!/usr/bin/env python #Copyright (C) 2014 by Glenn Hickey # #Released under the MIT license, see LICENSE.txt """ Moving the multinomial hmm from Scikit-Learn into this package so I can speed up the dynamic programming. Also take the opportunity to cut off the dependenciy to scikit which was a bit of an overkill sinc...
mit
shoyer/xarray
xarray/coding/cftime_offsets.py
1
35760
"""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
NazBen/impact-of-dependence
depimpact/conservative.py
1
32098
"""Impact of Dependencies. The main class inspect the impact of correlation on a quantity of interest of a model output. TODO: - Make test functions - Clean the code - Add a load/save to DependenceResult class - User np.tril to take the values of the matrices """ import json import operator import o...
mit
RTBHOUSE/pandas-gbq
pandas_gbq/gbq.py
1
49149
import warnings from datetime import datetime import json from time import sleep import uuid import time import sys import os import numpy as np from distutils.version import StrictVersion from pandas import compat, DataFrame, concat from pandas.compat import lzip, bytes_to_str def _check_google_client_version(): ...
bsd-3-clause
Kortemme-Lab/kddg
kddg/api/schema.py
1
62291
#!/usr/bin/python2.4 # encoding: utf-8 """ schema.py SQLAlchemy representation Created by Shane O'Connor 2015. Copyright (c) 2015 Shane O'Connor. All rights reserved. """ import sys import os import inspect import pprint import StringIO import gzip import pandas import traceback import getpass from sqlalchemy impor...
mit
evenmarbles/mlpy
mlpy/stats/dbn/hmm.py
1
43454
""" Hidden Markov Models ==================== .. autosummary:: :toctree: generated/ :nosignatures: HMM DiscreteHMM GaussianHMM StudentHMM GMMHMM """ from __future__ import division, print_function, absolute_import # noinspection PyUnresolvedReferences from six.moves import range from abc import...
mit
clawpack/clawpack-4.x
python/pyclaw/plotters/frametools.py
1
62155
""" Module frametools for plotting frames of time-dependent data. """ import os,sys,shutil,glob import string,re import time import traceback from pyclaw.data import Data from pyclaw.plotters import plotpages from matplotlib.colors import Normalize plotter = 'matplotlib' if plotter == 'matplotlib': if not s...
bsd-3-clause
MDAnalysis/mdanalysis
package/MDAnalysis/analysis/hole2/hole.py
1
61262
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- https://www.mdanalysis.org # Copyright (c) 2006-2020 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # # Released under t...
gpl-2.0
jakobj/nest-simulator
pynest/nest/lib/hl_api_types.py
1
38514
# -*- coding: utf-8 -*- # # hl_api_types.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 License, o...
gpl-2.0
jseabold/statsmodels
statsmodels/genmod/bayes_mixed_glm.py
4
38956
r""" Bayesian inference for generalized linear mixed models. Currently only families without additional scale or shape parameters are supported (binomial and Poisson). Two estimation approaches are supported: Laplace approximation ('maximum a posteriori'), and variational Bayes (mean field approximation to the poster...
bsd-3-clause
psychopy/versions
psychopy/info.py
1
31337
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """This module has tools for fetching data about the system or the current Python process....
gpl-3.0