repo_name
string
path
string
copies
string
size
string
content
string
license
string
jbpease/dfoil
dfoil.py
1
31705
#!/usr/bin/env python # -*- coding: utf-8 -*- """ DFOIL: Directional introgression testing a five-taxon phylogeny dfoil - Calculate DFOIL and D-statistics stats from one or more count files. James B. Pease http://www.github.com/jbpease/dfoil USAGE: dfoil.py INPUTFILE1 ... --out OUTPUTFILE1 ... """ from __future__ imp...
gpl-3.0
bdilday/nflMarkov
nflMarkov.py
1
59379
#!/usr/bin/env python import os, sys import re import pickle import numpy as np import copy from scipy import interpolate import scipy.sparse from matplotlib.backends.backend_pdf import PdfPages from matplotlib import pyplot as plt import matplotlib from matplotlib import pyplot as plt ############################ cl...
bsd-2-clause
Paul-St-Young/solid_hydrogen
chiesa_correction.py
1
34160
import numpy as np from itertools import product # =========================== get long-range U(k) =========================== def isotropic_jk2(jk2_dat, **kwargs): """ extract ee long-range Jastrow from Jk2.dat Jk2.dat should have kx,ky,kz, coeff_real columns This function currently assumes an extra coeff_i...
mit
kecnry/autofig
autofig/axes.py
1
73859
import numpy as np import astropy.units as u import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.collections import LineCollection from matplotlib import colorbar as mplcolorbar from matplotlib import gridspec as gridspec from matplotlib import __version__ as _mplversion from distu...
gpl-3.0
tanghaibao/jcvi
jcvi/variation/cnv.py
1
35517
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Helper functions for Copy Number Variations (CNV). """ import sys import logging import os.path as op import numpy as np import numpy.ma as ma import pandas as pd import pysam from collections import Counter, defaultdict from itertools import groupby from multiproces...
bsd-2-clause
ocefpaf/cartopy
lib/cartopy/mpl/geoaxes.py
1
81785
# (C) British Crown Copyright 2011 - 2020, Met Office # # This file is part of cartopy. # # cartopy is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option)...
lgpl-3.0
lvphj/epydemiology
epydemiology/phjRROR.py
1
36528
import pkg_resources try: pkg_resources.get_distribution('numpy') except pkg_resources.DistributionNotFound: numpyPresent = False print("Error: Numpy package not available.") else: numpyPresent = True import numpy as np try: pkg_resources.get_distribution('pandas') except pkg_resources.Distri...
mit
hughdbrown/QSTK-nohist
src/qstkutil/DataAccess.py
1
36984
''' (c) 2011, 2012 Georgia Tech Research Corporation This source code is released under the New BSD license. Please see http://wiki.quantsoftware.org/index.php?title=QSTK_License for license details. Created on Jan 1, 2011 @author: Shreyas Joshi @contact: shreyasj@gatech.edu @summary: Contains tutorial for backteste...
bsd-3-clause
Kate-Willett/Climate_Explorer
PYTHON/MakeTimeSpaceAveragePlotSave_Jul2018.py
1
73033
#!/usr/local/sci/bin/python # PYTHON3 # Python3 # Author: Kate Willett # Created: 26 July 2018 # Last update: 2 Aug 2018 # Location: /data/local/hadkw/HADCRUH2/UPDATE2017/PROGS/PYTHON/ # this will probably change # GitHub: https://github.com/Kate-Willett/Climate_Explorer/tree/master/PYTHON/ # ----------------------- # ...
cc0-1.0
Erotemic/vtool
vtool_ibeis/score_normalization.py
1
68734
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import utool as ut import ubelt as ub import scipy.interpolate from functools import partial def check_unused_kwargs(kwargs, expected_keys): unused_keys = set(kwargs.keys()) - set(expected...
apache-2.0
SCECcode/BBP
bbp/comps/anderson_gof.py
1
46073
#!/usr/bin/env python """ Copyright 2010-2018 University Of Southern California 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 appli...
apache-2.0
hvasbath/beat
beat/models/geodetic.py
1
34186
from logging import getLogger import os import copy from time import time from collections import OrderedDict import numpy as num from theano.printing import Print from theano import shared from theano import config as tconfig import theano.tensor as tt from pyrocko.gf import LocalEngine, RectangularSource from bea...
gpl-3.0
nicproulx/mne-python
mne/io/base.py
2
103296
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Denis Engemann <denis.engemann@gmail.com> # Teon Brooks <teon.brooks@gmail.com> # Marijn van Vliet <w.m.vanvli...
bsd-3-clause
nontas/menpowidgets
menpowidgets/utils.py
1
41754
from struct import pack as struct_pack import binascii import numpy as np import matplotlib.pyplot as plt from menpo.compatibility import unicode from menpo.feature import glyph, sum_channels def verify_ipython_and_kernel(): r""" Verify that the current environment is a valid IPython environment that con...
bsd-3-clause
embray/numpy
numpy/lib/function_base.py
1
118097
from __future__ import division, absolute_import, print_function __docformat__ = "restructuredtext en" __all__ = [ 'select', 'piecewise', 'trim_zeros', 'copy', 'iterable', 'percentile', 'diff', 'gradient', 'angle', 'unwrap', 'sort_complex', 'disp', 'extract', 'place', 'vectorize', 'asarray_chkfinite', 'ave...
bsd-3-clause
andyxhadji/incubator-airflow
airflow/contrib/hooks/bigquery_hook.py
1
70070
# -*- coding: 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
matthewghgriffiths/nestedbasinsampling
nestedbasinsampling/graphs/basinGraph2.py
1
32711
# -*- coding: utf-8 -*- from collections import defaultdict, namedtuple from itertools import chain, izip, groupby from functools import total_ordering from math import exp, log, sqrt import numpy as np from scipy.special import polygamma, betaln, gammaln from scipy.stats import chi2 import networkx as nx import mat...
gpl-3.0
jlyons871/Tax-Calculator
taxcalc/records.py
1
35205
""" This file reads input csv file and saves the variables """ import math import copy import pandas as pd import numpy as np import os.path import os from numba import vectorize, float64 from pkg_resources import resource_stream, Requirement class Records(object): """ This class represents the data for a col...
mit
alephu5/Soundbyte
environment/lib/python3.3/site-packages/mpl_toolkits/axes_grid1/axes_grid.py
1
30174
import matplotlib.cbook as cbook import matplotlib.pyplot as plt import matplotlib.axes as maxes #import matplotlib.colorbar as mcolorbar from . import colorbar as mcolorbar import matplotlib as mpl import matplotlib.patches as mpatches import matplotlib.lines as mlines import matplotlib.ticker as ticker from matplot...
gpl-3.0
paris-saclay-cds/ramp-workflow
rampwf/externals/tabulate.py
1
56027
# -*- coding: utf-8 -*- """Pretty-print tabular data.""" from __future__ import print_function from __future__ import unicode_literals from collections import namedtuple from platform import python_version_tuple import re import math if python_version_tuple() >= ("3", "3", "0"): from collections.abc import Iter...
bsd-3-clause
BhallaLab/moose
moose-examples/paper-2015/Fig6_NetMultiscale/ReducedModel.py
1
36806
#/********************************************************************** #** This program is part of 'MOOSE', the #** Messaging Object Oriented Simulation Environment. #** Copyright (C) 2003-2014 Upinder S. Bhalla. and NCBS #** It is made available under the terms of the #** GNU Lesser General Public License ...
gpl-3.0
yandex/yandex-tank
yandextank/plugins/Console/screen.py
1
40737
# -*- coding: utf-8 -*- ''' Classes to build full console screen ''' import fcntl import logging import os import struct import termios import time import bisect from collections import defaultdict import pandas as pd from ...common import util def get_terminal_size(): ''' Gets width and height of terminal v...
lgpl-2.1
pratapvardhan/pandas
pandas/tests/dtypes/test_inference.py
1
42609
# -*- coding: utf-8 -*- """ These the test the public routines exposed in types/common.py related to inference and not otherwise tested in types/test_common.py """ from warnings import catch_warnings import collections import re from datetime import datetime, date, timedelta, time from decimal import Decimal import n...
bsd-3-clause
geomagpy/magpy
magpy/gui/magpy_gui.py
1
348514
#!/usr/bin/env python from __future__ import print_function import wx from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas from matplotlib.backends.backend_wx import NavigationToolbar2Wx from matplotlib.figure import Figure try: from pypubsub import setupkwargs except: try: # Neces...
bsd-3-clause
alanhdu/colored
colored/data.py
1
44326
from __future__ import division import numpy as np _bwr_data = [ (0, (0.0, 0.0, 1.0)), (1/2, (1.0, 1.0, 1.0)), (1, (1.0, 0.0, 0.0)) ] _brg_data = [ (0, (0.0, 0.0, 1.0)), (1/2, (1.0, 0.0, 0.0)), (1, (0.0, 1.0, 0.0)) ] _seismic_data = [ (0, (0.0, 0.0, 0.3)), (1/4, (0.0, 0.0, 1.0)), ...
mit
jgao54/airflow
airflow/hooks/hive_hooks.py
1
36659
# -*- coding: 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
aeklant/scipy
scipy/stats/_discrete_distns.py
2
30559
# # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from scipy import special from scipy.special import entr, logsumexp, betaln, gammaln as gamln from scipy._lib._util import _lazywhere from numpy import floor, ceil, log, exp, sqrt, log1p, expm1, tanh, cosh, sinh im...
bsd-3-clause
JoshDaly/scriptShed
parse_hit_data.trackm.py
1
47544
#!/usr/bin/env python ############################################################################### # # __parse_hit_data.trackm__.py - description! # ############################################################################### # # # This program is free software: you can redistribute it and/or modify # # it under ...
gpl-2.0
zohannn/motion_manager
scripts/old/controlling/predicting_picking_for_control.py
1
297910
#!/usr/bin/env python3 import sys import pandas as pd from sklearn import decomposition from sklearn import metrics from sklearn.externals import joblib import matplotlib.pyplot as plt import tensorflow as tf import numpy as np import math from random import randint # HUPL from HUPL.learner import preprocess_featur...
mit
mwojnars/nifty
math.py
1
50895
''' Statistical and mathematical routines. Built on top of 'numpy'. --- This file is part of Nifty python package. Copyright (c) by Marcin Wojnarski. Nifty 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...
gpl-3.0
mdshw5/fastqp
fastqp/plots.py
1
33367
from __future__ import division import sys import numpy as np import math import matplotlib as mpl if sys.platform is not 'darwin': mpl.use('Agg') import matplotlib.pyplot as plt import matplotlib.mlab as mlab import scipy.stats from matplotlib.colors import LinearSegmentedColormap from cycler import cycler from s...
mit
lahwran/dotfiles
packages/at/at/__init__.py
1
40656
#!/usr/bin/env python # python 2 only, adjust path (or port, I'd love you) as needed # run @ --help for (a little) more information # MIT licensed. """\ primarily a python eval command. auto-formats the result of your expression: (> indicates the line contains user input) > $ @ '1' 1 > $ @ '1 + 1' 2 > $ ...
mit
ranaroussi/qtpylib
qtpylib/tools.py
1
31862
#!/usr/bin/env python # -*- coding: utf-8 -*- # # QTPyLib: Quantitative Trading Python Library # https://github.com/ranaroussi/qtpylib # # Copyright 2016-2018 Ran Aroussi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obta...
apache-2.0
fboers/jumeg
jumeg/jumeg_volume_plotting.py
1
38705
from os import path as op import numpy as np from matplotlib import pyplot as plt import time as time2 from time import strftime, localtime from nibabel.affines import apply_affine from nilearn import plotting from nilearn.image import index_img from nilearn.plotting.img_plotting import _MNI152Template MNI152TEMPLAT...
bsd-3-clause
nicocardiel/pyemir
emirdrp/tools/fit_boundaries.py
1
62802
# # Copyright 2008-2018 Universidad Complutense de Madrid # # This file is part of PyEmir # # PyEmir 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 l...
gpl-3.0
UCBerkeleySETI/breakthrough
ML/CNNFRB/research_code/train.py
1
31334
from __future__ import print_function import tensorflow as tf from resnet import RESNET, UPDATE_OPS_COLLECTION, RESNET_VARIABLES, MOVING_AVERAGE_DECAY from image_reader import Reader, get_corpus_size, load_data_to_memory from filterbank_reader import FReader import math, numpy as np import os, sys, io import time impor...
gpl-3.0
plotly/python-api
packages/python/plotly/plotly/graph_objs/scatter3d/line/_colorbar.py
1
69628
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatter3d.line" _path_str = "scatter3d.line.colorbar" _valid_props = { "bgcolor", ...
mit
allisony/pyspeckit
pyspeckit/spectrum/fitters.py
1
91957
from __future__ import print_function import matplotlib import numpy as np import copy import re import warnings from astropy import log from astropy import units as u from astropy.extern.six.moves import xrange from astropy.extern.six import string_types from ..config import mycfg from ..config import ConfigDescript...
mit
imperial-genomics-facility/data-management-python
igf_data/igfdb/collectionadaptor.py
1
34799
import os import pandas as pd from igf_data.utils.fileutils import calculate_file_checksum from igf_data.igfdb.baseadaptor import BaseAdaptor from igf_data.igfdb.fileadaptor import FileAdaptor from igf_data.igfdb.igfTables import Collection, File, Collection_group, Collection_attribute class CollectionAdaptor(B...
apache-2.0
sgiavasis/nipype
nipype/pipeline/engine/utils.py
2
50809
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Utility routines for workflow graphs """ from future import standard_library standard_library.install_aliases() from builtins import map from builtins impo...
bsd-3-clause
sergelhomme/Network_Analysis
Network_Analysis_1_3/network_analysis/network_analysis.py
1
187486
# -*- coding: utf-8 -*- #----------------------------------------------------------- # # NetworkAnalysis # Copyright Serge Lhomme # EMAIL: serge.lhomme (at) u-pec.fr # WEB : http://sergelhomme.fr/deven.html # # Tools for analyzing networks characteristics # #--------------------------------------------------...
gpl-2.0
plotly/plotly.py
packages/python/plotly/plotly/graph_objs/_funnel.py
1
103322
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Funnel(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "funnel" _valid_props = { "alignmentgroup", "cliponaxis", "connector", "c...
mit
farr/carma_pack
src/carmcmc/carma_pack.py
1
68810
__author__ = 'Brandon C. Kelly' import numpy as np import matplotlib.pyplot as plt from scipy.linalg import solve from scipy.optimize import minimize import samplers import multiprocessing import _carmcmc as carmcmcLib class CarmaModel(object): """ Class for performing statistical inference assuming a CARMA(...
mit
caganze/splat
splat/plot.py
1
58220
from __future__ import print_function, division """ .. note:: These are the plotting functions for the SPLAT code """ # imports: internal import copy import glob import os # imports: external from astropy.coordinates import Angle,SkyCoord # coordinate conversion import astropy.units as u import matpl...
mit
iancrossfield/aries_reduce
phot.py
1
46756
"""Python script for various photometry tasks. See especially :func:`aperphot`, for basic aperture photometry. If you need something fancier, try PyRAF, DAOPHOT, etc. """ # 2008-12-21 18:27 IJC: Created from numpy import array, sign, pi, nan, arange import numpy as np import pdb try: import _chi2 c_chisq = ...
mit
johannfaouzi/pyts
pyts/classification/tsbf.py
1
30852
"""Code for Time Series Bag-of-Features.""" # Author: Johann Faouzi <johann.faouzi@gmail.com> # License: BSD-3-Clause from math import ceil from numba import njit import numpy as np from sklearn.base import BaseEstimator from sklearn.ensemble import RandomForestClassifier from sklearn.utils.validation import ( ch...
bsd-3-clause
thunderhoser/GewitterGefahr
gewittergefahr/gg_utils/gridded_forecasts_test.py
1
33436
"""Unit tests for gridded_forecasts.py.""" import copy import unittest import numpy import pandas from gewittergefahr.gg_utils import polygons from gewittergefahr.gg_utils import projections from gewittergefahr.gg_utils import gridded_forecasts TOLERANCE = 1e-6 # The following constants are used to test _column_name...
mit
teonlamont/mne-python
mne/cov.py
2
78672
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Denis A. Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) from copy import deepcopy import itertools as itt from math import log import os import numpy as np from sci...
bsd-3-clause
CivicKnowledge/ambry_sources
ambry_sources/mpf.py
1
39175
# -*- coding: utf-8 -*- """ Writing data to a partition. The MPR file format is a conversion format that stores tabular data in rows and associates it with metadata. Copyright (c) 2015 Civic Knowledge. This file is licensed under the terms of the Revised BSD License, included in this distribution as LICENSE.txt """ i...
bsd-2-clause
alephu5/Soundbyte
environment/lib/python3.3/site-packages/pandas/io/data.py
1
31493
""" Module contains tools for collecting data from various remote sources """ import warnings import tempfile import datetime as dt import time from collections import defaultdict import numpy as np from pandas.compat import( StringIO, bytes_to_str, range, lrange, lmap, zip ) import pandas.compat as compat fro...
gpl-3.0
CompPhysics/MachineLearning
doc/LectureNotes/_build/jupyter_execute/statistics.py
1
60608
# Elements of Probability Theory and Statistical Data Analysis ## Domains and probabilities Consider the following simple example, namely the tossing of two dice, resulting in the following possible values $$ \{2,3,4,5,6,7,8,9,10,11,12\}. $$ These values are called the *domain*. To this domain we have the corresp...
cc0-1.0
gfyoung/pandas
pandas/core/arrays/datetimes.py
1
79441
from __future__ import annotations from datetime import datetime, time, timedelta, tzinfo from typing import Optional, Union, cast import warnings import numpy as np from pandas._libs import lib, tslib from pandas._libs.tslibs import ( BaseOffset, NaT, NaTType, Resolution, Timestamp, conversi...
bsd-3-clause
wiheto/teneto
teneto/utils/utils.py
1
36466
"""General utility functions.""" import collections import itertools import operator import json import numpy as np import pandas as pd import scipy.spatial.distance as distance import teneto #from ..classes import teneto.TemporalNetwork #from ..trajectory import rdp def graphlet2contact(tnet, params=None): """ ...
gpl-3.0
d2l-ai/d2l-zh
d2l/torch.py
1
115099
# This file is generated automatically through: # d2lbook build lib # Don't edit it directly # Defined in file: ./chapter_preface/index.md import collections import hashlib import math import os import random import re import shutil import sys import tarfile import time import zipfile from collections import defaul...
apache-2.0
maropu/spark
python/pyspark/pandas/accessors.py
2
35612
# # 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
aestrivex/cvu
cvu/dataset.py
1
38659
# (C) Roan LaPlante 2013 rlaplant@nmr.mgh.harvard.edu # # This file is part of cvu, the Connectome Visualization Utility. # # cvu 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 o...
gpl-3.0
feuerchop/increOCSVM
evaluation.py
1
48440
__author__ = 'LT' import sys import matplotlib matplotlib.use('Agg') from sklearn import preprocessing, cross_validation, svm from sklearn.metrics import confusion_matrix, precision_recall_curve, precision_recall_fscore_support, average_precision_score import pandas as pd from pandas import Series, crosstab import nump...
gpl-2.0
ocelot-collab/ocelot
ocelot/gui/genesis4_plot.py
1
48026
""" user interface for viewing genesis simulation results """ """ MEMO plt.gcf() to get current figure plt.gca() to get current axis ax.set_xlabel('') ax.get_xlim() ax.set_xlim([0, 1]) ax.set_ylim(ymin=0) """ import sys import os import csv import time import matplotlib # check if Xserver is connected # havedispl...
gpl-3.0
cellular-nanoscience/pyotic
pyotc/psd.py
1
72043
# -*- coding: utf-8 -*- # """ # - Author: steve simmert # - E-mail: steve.simmert@uni-tuebingen.de # - Copyright: 2015 # """ """ Manage power spectral densities measurements. """ import pdb from . import ureg from . import name_constants as co from .data_parser import read_PSD_parameter_file from .data_parser import ...
apache-2.0
dschick/udkm1Dsim
udkm1Dsim/structures/layers.py
1
35985
#!/usr/bin/env python # -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2020 Daniel Schick # # 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, including with...
mit
kmunve/TSanalysis
Crocus/crocus_forcing_nc.py
1
36359
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function from netCDF4 import Dataset, num2date from string import Template from datetime import datetime ''' Create a forcing netcdf file for the snow pack model Crocus. ''' class CrocusForcing: def __init__(self, no_points=1, filename=No...
mit
trichter/qopen
qopen/imaging.py
1
30241
# Copyright 2015-2019 Tom Eulenfeld, MIT license """ Plotting functions Arguments supported by all plotting functions via its \\*\\*kwargs are: :fname: file name for the plot output (if not provided the figure will be left open) :title: title of the plot :figsize: figure size (tuple of inches) :dpi: resolutio...
mit
edusegzy/pychemqt
tools/UI_Tables.py
1
193622
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################### # Library with meos plugin functionality # # plugin: QMenu to import in mainwindow with all meos addon functionality # Implement the plugin functionality with a menu to show in mainwindow #...
gpl-3.0
helgestein/XRDExplorer
main.py
1
35562
import sys #QT imports from PyQt5.QtWidgets import QApplication, QMainWindow, QInputDialog, QLineEdit, QFileDialog, QErrorMessage, QTableWidget, QTableWidgetItem,QTableWidgetItem from PyQt5 import QtCore, QtWidgets, uic from main_designer import Ui_MainWindow # plotting import matplotlib matplotlib.use('Qt5Agg') from m...
gpl-3.0
cactusbin/nyt
matplotlib/lib/matplotlib/backends/backend_wx.py
1
72678
from __future__ import division, print_function """ A wxPython backend for matplotlib, based (very heavily) on backend_template.py and backend_gtk.py Author: Jeremy O'Donoghue (jeremy@o-donoghue.com) Derived from original copyright work by John Hunter (jdhunter@ace.bsd.uchicago.edu) Copyright (C) Jeremy O'Dono...
unlicense
jinzishuai/learn2deeplearn
deeplearning.ai/C4.CNN/week3_ObjectDetection/hw/Car detection for Autonomous Driving/Autonomous+driving+application+-+Car+detection+-+v1.py
1
36997
#!/usr/bin/python3 # coding: utf-8 # # Autonomous driving - Car detection # # Welcome to your week 3 programming assignment. You will learn about object detection using the very powerful YOLO model. Many of the ideas in this notebook are described in the two YOLO papers: Redmon et al., 2016 (https://arxiv.org/abs/150...
gpl-3.0
sgiavasis/nipype
nipype/algorithms/misc.py
4
51523
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ''' Miscellaneous algorithms Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname(os.path.realpath(__file__)) >>> datadir = os.path.realpath(...
bsd-3-clause
winklerand/pandas
pandas/tests/frame/test_operators.py
1
45036
# -*- coding: utf-8 -*- from __future__ import print_function from collections import deque from datetime import datetime import operator import pytest from numpy import nan, random import numpy as np from pandas.compat import lrange, range from pandas import compat from pandas import (DataFrame, Series, MultiIndex...
bsd-3-clause
mozata/menpo
menpo/visualize/widgets/base.py
1
82213
import numpy as np from collections import Sized from matplotlib.pyplot import show as pltshow import ipywidgets import IPython.display as ipydisplay from menpo.visualize.viewmatplotlib import (MatplotlibImageViewer2d, sample_colours_from_colourmap) from .options import (R...
bsd-3-clause
louispotok/pandas
pandas/core/indexes/base.py
1
168499
from datetime import datetime, timedelta import warnings import operator from textwrap import dedent import numpy as np from pandas._libs import (lib, index as libindex, tslib as libts, algos as libalgos, join as libjoin, Timedelta) from pandas._libs.lib import is_da...
bsd-3-clause
anntzer/scikit-learn
sklearn/manifold/tests/test_t_sne.py
2
37837
import sys from io import StringIO import numpy as np from numpy.testing import assert_allclose import scipy.sparse as sp import pytest from sklearn.neighbors import NearestNeighbors from sklearn.neighbors import kneighbors_graph from sklearn.exceptions import EfficiencyWarning from sklearn.utils._testing import ignor...
bsd-3-clause
pravsripad/jumeg
jumeg/decompose/ica.py
2
35344
# ICA functions ''' authors: Juergen Dammers Lukas Breuer email: j.dammers@fz-juelich.de Change history: 21.01.2020: - changes in ica_array - now returns an MNE-type of ICA object (default) - in fastica changed default to whiten=False - added fu...
bsd-3-clause
ARM-software/lisa
lisa/stats.py
1
45094
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2020, Arm Limited and contributors. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
apache-2.0
Stargrazer82301/CAAPR
CAAPR/CAAPR_AstroMagic/PTS/pts/core/plot/scaling.py
1
32298
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
mit
charanpald/wallhack
wallhack/influence2/ArnetMinerDataset.py
1
31195
import os import numpy import logging import difflib import csv import re import sklearn.feature_extraction.text as text import gc import scipy.sparse import igraph import array import itertools import gensim.matutils import scipy.io from gensim.models.ldamodel import LdaModel from gensim.models.lsimodel import ...
gpl-3.0
ProjectPyRhO/PyRhO
pyrho/models.py
1
43131
""" Rhodopsin model class and functions * Three-state model :math:`\{C, O, D\}` * Four-state model :math:`\{C_1, O_1, O_2, C_2\}` * Six-state model :math:`\{C_1, I_1, O_1, O_2, I_2, C_2\}` """ from __future__ import print_function, division import warnings import logging import abc import itertools from co...
bsd-3-clause
wilsonkichoi/zipline
zipline/data/us_equity_pricing.py
1
42283
# 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 writ...
apache-2.0
yanheven/pyfolio
pyfolio/timeseries.py
2
32352
# # 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
drueffer/apage_rom
plugins/Patterns.py
1
92024
# -*- coding: utf-8 -*- """ Created on Fri Aug 17 11:17:55 2012 @author: rueffer """ import numpy as np import time from PatternGenerator import * # Must always be (self,name,library,..*args,unitFact=1E3,**kwargs) # Please indicate the name of the pattern and give a dict with name allPatterns ## TODO:...
gpl-2.0
tseaver/google-cloud-python
bigquery/tests/unit/test_client.py
1
259202
# Copyright 2015 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
Erotemic/ibeis
ibeis/algo/graph/core.py
1
55530
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np # NOQA import utool as ut # import logging import itertools as it import copy import six import collections from ibeis import constants as const from ibeis.algo.graph import nx_dynamic_graph # ...
apache-2.0
napsternxg/gensim
gensim/utils.py
1
65645
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """Various general utility functions.""" from __future__ import with_statement from contextlib import contextmanager import collections...
gpl-3.0
ranaroussi/qtpylib
qtpylib/broker.py
1
38577
#!/usr/bin/env python # -*- coding: utf-8 -*- # # QTPyLib: Quantitative Trading Python Library # https://github.com/ranaroussi/qtpylib # # Copyright 2016-2018 Ran Aroussi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obta...
apache-2.0
leggitta/mne-python
mne/epochs.py
1
103920
"""Tools for working with epoched data""" # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de> # Denis Engemann <denis.engemann@gmail.com> # Mainak Jas <mainak@neuro...
bsd-3-clause
kwhitehall/climate
ocw/plotter.py
1
33918
# 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
dssg/wikienergy
disaggregator/build/pandas/pandas/tseries/tests/test_offsets.py
1
139977
import os from datetime import date, datetime, timedelta from dateutil.relativedelta import relativedelta from pandas.compat import range from pandas import compat import nose from nose.tools import assert_raises import numpy as np from pandas.core.datetools import ( bday, BDay, CDay, BQuarterEnd, BMonthEnd, ...
mit
HesselTjeerdsma/Cyber-Physical-Pacman-Game
Algor/flask/lib/python2.7/site-packages/scipy/signal/ltisys.py
1
123389
""" ltisys -- a collection of classes and functions for modeling linear time invariant systems. """ from __future__ import division, print_function, absolute_import # # Author: Travis Oliphant 2001 # # Feb 2010: Warren Weckesser # Rewrote lsim2 and added impulse2. # Apr 2011: Jeffrey Armstrong <jeff@approximatrix.co...
apache-2.0
toobaz/pandas
pandas/io/formats/format.py
1
62027
""" Internal module for formatting output data in csv, html, and latex files. This module also applies to display formatting. """ from functools import partial from io import StringIO import re from shutil import get_terminal_size from typing import ( TYPE_CHECKING, Any, Callable, Dict, Iterable, ...
bsd-3-clause
Jorge-C/bipy
skbio/draw/distributions.py
1
30884
#!/usr/bin/env python """ Distribution visualizations (:mod:`skbio.draw.distributions`) ============================================================= .. currentmodule:: skbio.draw.distributions This module provides plotting functionality for visualizing distributions. Functions --------- .. autosummary:: :toctre...
bsd-3-clause
sstoma/CellProfiler
CellProfiler.py
1
40944
""" 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 see the AUTHORS file for credits. Website: http://www.cellprofiler.org...
gpl-2.0
MattNolanLab/ei-attractor
noisefigs/noisefigs/plotters/gamma.py
1
38849
'''Plotters for gamma oscillation-related data. .. currentmodule:: noisefigs.plotters.gamma Classes ------- .. autosummary:: GammaSweepsPlotter GenericGammaPlotter Generic1DGammaPlotter GammaDetailedNoisePlotter GammaExamplePlotter GammaScatterAllPlotter GammaFreqGridsScatterAllPlotter ...
gpl-3.0
aarchiba/scipy
scipy/stats/stats.py
1
233527
# Copyright 2002 Gary Strangman. All rights reserved # Copyright 2002-2016 The SciPy Developers # # The original code from Gary Strangman was heavily adapted for # use in SciPy by Travis Oliphant. The original code came with the # following disclaimer: # # This software is provided "as-is". There are no expressed or...
bsd-3-clause
avistous/QSTK
Bin/report.py
1
49161
''' (c) 2011, 2012 Georgia Tech Research Corporation This source code is released under the New BSD license. Please see http://wiki.quantsoftware.org/index.php?title=QSTK_License for license details. Created on Jan 1, 2011 @author:Drew Bratcher @contact: dbratcher@gatech.edu @summary: Contains tutorial for...
bsd-3-clause
NicWayand/xray
xarray/test/test_plot.py
1
41802
import inspect import numpy as np import pandas as pd from xarray import DataArray import xarray.plot as xplt from xarray.plot.plot import _infer_interval_breaks from xarray.plot.utils import (_determine_cmap_params, _build_discrete_cmap, _color_palette) ...
apache-2.0
ndingwall/scikit-learn
sklearn/inspection/_plot/partial_dependence.py
1
39105
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
BigDataforYou/movie_recommendation_workshop_1
big_data_4_you_demo_1/venv/lib/python2.7/site-packages/pandas/tests/indexes/test_datetimelike.py
2
36423
# -*- coding: utf-8 -*- from datetime import timedelta, time import numpy as np from pandas import (date_range, period_range, Series, Index, DatetimeIndex, TimedeltaIndex, PeriodIndex) import pandas.util.testing as tm import pandas as pd from pandas.lib import Timestamp fro...
mit
INM-6/viziphant
viziphant/rasterplot.py
1
34068
""" Raster and event plots of spike times ------------------------------------- .. autosummary:: :toctree: toctree/rasterplot/ eventplot rasterplot rasterplot_rates """ # Copyright 2017-2020 by the Viziphant team, see `doc/authors.rst`. # License: Modified BSD, see LICENSE.txt for details. import ma...
bsd-3-clause
teoliphant/scipy
scipy/signal/windows.py
2
44370
"""The suite of window functions.""" import numpy as np from scipy import special, linalg from scipy.fftpack import fft __all__ = ['boxcar', 'triang', 'parzen', 'bohman', 'blackman', 'nuttall', 'blackmanharris', 'flattop', 'bartlett', 'hanning', 'barthann', 'hamming', 'kaiser', 'gaussian', 'gene...
bsd-3-clause
Pappulab/localCIDER
localcider/sequenceParameters.py
1
78167
""" !--------------------------------------------------------------------------! ! LICENSE INFO: ! !--------------------------------------------------------------------------! ! This file is part of localCIDER. ...
gpl-2.0
pradyu1993/scikit-learn
sklearn/linear_model/least_angle.py
1
41630
""" 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