repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
vincentadam87/time_freq_auditory_scene | TimeFreqAuditoryScene.py | 1 | 37100 | """
This module provides classes to declare, play and plot auditory scene populated by elements in the (time, frequency) domain
The scene is organized as a tree with Leaves as atom elements of the scene.
The tree offers a way to group atoms, and make group of groups etc...
This is useful:
- to declare structured... | bsd-3-clause |
mganeva/mantid | scripts/PyChop/PyChopGui.py | 1 | 45137 | #!/usr/bin/python
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
# pylint: disable=line-too-... | gpl-3.0 |
jhunkeler/acstools | acstools/satdet.py | 1 | 36787 | """This module contains the tools needed for satellite detection
within an ACS/WFC image as published in
`ACS ISR 2016-01 <http://www.stsci.edu/hst/acs/documents/isrs/isr1601.pdf>`_.
.. note::
Only tested for ACS/WFC FLT and FLC images, but it should
theoretically work for any instrument.
Requires skimag... | bsd-3-clause |
linebp/pandas | pandas/tests/indexes/test_base.py | 1 | 79486 | # -*- coding: utf-8 -*-
import pytest
from datetime import datetime, timedelta
import pandas.util.testing as tm
from pandas.core.indexes.api import Index, MultiIndex
from pandas.tests.indexes.common import Base
from pandas.compat import (range, lrange, lzip, u,
text_type, zip, PY3, PY36)
... | bsd-3-clause |
gfyoung/scipy | scipy/cluster/hierarchy.py | 1 | 148536 | """
========================================================
Hierarchical clustering (:mod:`scipy.cluster.hierarchy`)
========================================================
.. currentmodule:: scipy.cluster.hierarchy
These functions cut hierarchical clusterings into flat clusterings
or find the roots of the forest f... | bsd-3-clause |
gsnyder206/synthetic-image-morph | setup_illustris_morphs.py | 1 | 54336 | import cProfile
import pstats
import math
import string
import sys
import struct
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as pyplot
import matplotlib.colors as pycolors
import matplotlib.cm as cm
import matplotlib.patches as patches
import numpy as np
import cPickle
import asciitable
import scip... | gpl-2.0 |
gengliangwang/spark | python/pyspark/pandas/tests/test_series.py | 1 | 120579 | #
# 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 |
iproduct/course-social-robotics | 11-dnn-keras/venv/Lib/site-packages/seaborn/tests/test_relational.py | 1 | 56653 | from itertools import product
import warnings
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.colors import same_color
import pytest
from numpy.testing import assert_array_equal
from ..palettes import color_palette
from ..relational import (
_Relati... | gpl-2.0 |
ContinuumIO/blaze | blaze/compute/tests/test_pandas_compute.py | 3 | 41005 | from __future__ import absolute_import, division, print_function
import pytest
from datetime import datetime, timedelta, date, time
import numpy as np
import pandas as pd
import pandas.util.testing as tm
from pandas import DataFrame, Series
from string import ascii_lowercase
from blaze.compute.core import compute... | bsd-3-clause |
saguziel/incubator-airflow | airflow/www/views.py | 1 | 93874 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | apache-2.0 |
jjdmol/LOFAR | CEP/PyBDSM/src/python/psf_vary.py | 1 | 48910 |
import numpy as N
from image import *
import mylogger
from copy import deepcopy as cp
from . import has_pl
if has_pl:
import matplotlib.pyplot as pl
import scipy
import scipy.signal as S
import _cbdsm
import functions as func
import _pytesselate as _pytess
import shapelets as sh
from scipy.optimize import leastsq
... | gpl-3.0 |
tensorflow/probability | tensorflow_probability/python/mcmc/replica_exchange_mc.py | 1 | 46338 | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 |
johnnyliu27/openmc | openmc/data/photon.py | 1 | 37671 | from collections import OrderedDict
from collections.abc import Mapping, Callable
from copy import deepcopy
from io import StringIO
from numbers import Integral, Real
import os
import h5py
import numpy as np
import pandas as pd
from scipy.interpolate import CubicSpline
from openmc.mixin import EqualityMixin
import op... | mit |
dricciardelli/vae2vec | def_def_alt.py | 1 | 36437 | ''' 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 |
gcarq/freqtrade | tests/optimize/test_hyperopt.py | 1 | 41762 | # pragma pylint: disable=missing-docstring,W0212,C0103
import locale
import logging
import re
from datetime import datetime
from pathlib import Path
from typing import Dict, List
from unittest.mock import MagicMock
import pandas as pd
import pytest
from arrow import Arrow
from filelock import Timeout
from freqtrade i... | gpl-3.0 |
ContinuumIO/blaze | blaze/compute/tests/test_sql_compute.py | 3 | 76524 | from __future__ import absolute_import, division, print_function
import pytest
sa = pytest.importorskip('sqlalchemy')
import itertools
import sqlite3
from distutils.version import LooseVersion
import datashape
from odo import into, discover
import numpy as np
import pandas as pd
import pandas.util.testing as tm
fr... | bsd-3-clause |
USDA-ARS-NWRC/AWSF | awsm/interface/ingest_data.py | 1 | 34712 | import copy
import glob
import os
from collections import OrderedDict
from datetime import datetime
import netCDF4 as nc
import numpy as np
from netCDF4 import Dataset
from smrf.utils import utils
from spatialnc import ipw
C_TO_K = 273.16
FREEZE = C_TO_K
class StateUpdater():
"""
Class to initialize the upda... | gpl-3.0 |
kasperschmidt/TDOSE | tdose_utilities.py | 1 | 250021 | # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
import numpy as np
import os
import datetime
import sys
import astropy
from astropy import wcs
from astropy import units
from astropy import convolution
import astropy.convolution as ac # convolve, convolve_fft... | mit |
matthewpklein/battsimpy | battsimpy/params.py | 1 | 39463 | # -*- coding: utf-8 -*-
"""Model parameter class.
"""
import numpy
import scipy.interpolate
# from matplotlib import pyplot as plt
# battsimpy specific modules
from helper_modules import confreader
from helper_modules import batteqns
class Params():
"""
Contains all parameters for the battery model.
"""
... | gpl-3.0 |
cloud-fan/spark | python/pyspark/pandas/accessors.py | 1 | 35116 | #
# 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 |
shubham0d/smc | salvus/sage_server.py | 1 | 68186 | #!/usr/bin/env python
"""
sage_server.py -- unencrypted forking TCP server.
Note: I wrote functionality so this can run as root, create accounts on the fly,
and serve sage as those accounts. Doing this is horrendous from a security point of
view, and I'm definitely not doing this. None of that functionality is actua... | gpl-3.0 |
weaver-viii/h2o-3 | h2o-py/h2o/frame.py | 1 | 47967 | # -*- coding: utf-8 -*-
# import numpy no numpy cuz windoz
import collections, csv, itertools, os, re, tempfile, uuid, urllib2, sys, urllib,imp
from expr import h2o,ExprNode
import gc
class H2OFrame:
# Magical count-of-5: (get 2 more when looking at it in debug mode)
# 2 for _do_it frame, 2 for _do_it loca... | apache-2.0 |
songjs1993/DeepLearning | 5Project/car_search/Car.py | 1 | 35421 | # Auther: Alan
"""
"""
import tensorflow as tf
import random
import os
import scipy.io as sio
# import matplotlib.pyplot as plt # plt
import matplotlib.image as mpimg # mpimg
import numpy as np
# import Image
import math
from PIL import Image
class Car:
def __init__(self):
print("init")
def weight_va... | apache-2.0 |
adbuerger/casiopeia | casiopeia/doe.py | 1 | 44952 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of casiopeia.
#
# Copyright 2014-2016 Adrian Bürger, Moritz Diehl
#
# casiopeia 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... | lgpl-3.0 |
xenu256/QProb | aggregator/tasks.py | 1 | 30894 | from datetime import datetime
from time import mktime, sleep
import random
from os import listdir, rename, remove, name
from os.path import isfile, join
from asyncio import gather
from textwrap import wrap
import warnings
from subprocess import call
import requests
from PIL import Image
from feedparser import parse
fr... | lgpl-3.0 |
i-sultan/Smart-Trader | src/st_train_model.py | 1 | 81127 | """Module for predictive models training, validation, and testing.
"""
#.-------------------.
#| imports |
#'-------------------'
import time
import pandas as pd
from pandas.tseries.holiday import USFederalHolidayCalendar
from pandas.tseries.offsets import CustomBusinessDay
import itertools
from ... | gpl-3.0 |
aeklant/scipy | scipy/special/add_newdocs.py | 1 | 236461 | # Docstrings for generated ufuncs
#
# The syntax is designed to look like the function add_newdoc is being
# called from numpy.lib, but in this file add_newdoc puts the
# docstrings in a dictionary. This dictionary is used in
# _generate_pyx.py to generate the docstrings for the ufuncs in
# scipy.special at the C level... | bsd-3-clause |
dwillmer/numpy | numpy/linalg/linalg.py | 1 | 75895 | """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 |
lincoln-lil/flink | flink-python/pyflink/fn_execution/flink_fn_execution_pb2.py | 1 | 106942 | ################################################################################
# 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... | apache-2.0 |
graemenott/SPIF | spif.py | 1 | 32253 | #! /usr/bin/env python3
"""
name: spif.py
version: 0.2
python: 3.4
author: Graeme Nott
email: graeme.nott@faam.ac.uk
created: Mar 2017
Program to create and read Single Particle Image Format (SPIF) files.
"""
import sys
import datetime, pytz
import numpy as np
import matplotlib
import netCDF4
import h... | lgpl-3.0 |
sauloal/cnidaria | scripts/venv/lib/python2.7/site-packages/pandas/tseries/index.py | 1 | 72441 | # pylint: disable=E1101
import operator
from datetime import time, datetime
from datetime import timedelta
import numpy as np
import warnings
from pandas.core.common import (_NS_DTYPE, _INT64_DTYPE,
_values_from_object, _maybe_box,
ABCSeries, is_intege... | mit |
data-8/datascience | datascience/tables.py | 1 | 238224 | """Tables are sequences of labeled columns."""
__all__ = ['Table']
import abc
import collections
import collections.abc
import copy
import functools
import inspect
import itertools
import numbers
import urllib.parse
import warnings
import numpy as np
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot a... | bsd-3-clause |
guedou/scapy-bpf | scapy/layers/inet.py | 1 | 60400 | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
"""
IPv4 (Internet Protocol v4).
"""
import os,time,struct,re,socket,new
from select import select
from collections impo... | gpl-2.0 |
atmtools/typhon | typhon/files/handlers/common.py | 1 | 31731 | from collections import defaultdict
from copy import copy
from datetime import datetime
from functools import wraps
import glob
from inspect import signature, ismethod
import os
import pickle
import warnings
import netCDF4
import pandas as pd
import xarray as xr
import numpy as np
from fsspec.implementations.local im... | mit |
legacysurvey/legacypipe | py/legacypipe/runbrick.py | 1 | 161521 | '''
Main "pipeline" script for the Legacy Survey (DECaLS, MzLS, BASS)
data reductions.
For calling from other scripts, see:
- :py:func:`run_brick`
Or for much more fine-grained control, see the individual stages:
- :py:func:`stage_tims`
- :py:func:`stage_refs`
- :py:func:`stage_outliers`
- :py:func:`stage_halos`
- ... | bsd-3-clause |
justinfinkle/pydiffexp | pydiffexp/gnw/simulation.py | 1 | 40934 | import copy
import itertools as it
import os
import random
import subprocess
import warnings
import xml.etree.ElementTree as eT
from typing import Union, Dict
import networkx as nx
import numpy as np
import pandas as pd
from nxpd import draw
from scipy import stats
# The namespace needs to be registered before a tree... | gpl-3.0 |
minhouse/python-lesson | code_for_review4.py | 1 | 57177 | import sys, os, codecs, shutil, re, math, csv
import datetime as dt
import xlsxwriter
import pandas as pd
import numpy as np
import collections
import openpyxl
import seaborn as sns
from openpyxl.drawing.image import Image
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
allmeter = 'ReadingPerf_202004... | mit |
jefemagril/fermipy | fermipy/utils.py | 1 | 50414 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function
import os
import re
import copy
import tempfile
import functools
from collections import OrderedDict
import xml.etree.cElementTree as et
import yaml
import numpy as np
import scipy.optimize
f... | bsd-3-clause |
claraya/meTRN | python/mapData.py | 1 | 50686 | #!/usr/bin/env python
# generate peak set complete files, binding region files, and report files!
import sys
import time
import optparse
import general
import numpy
import pickle
import pdb
import metrn
import modencode
import os
import itertools
print "Command:", " ".join(sys.argv)
print "Timestamp:", time.asctime(... | mit |
ryandougherty/mwa-capstone | MWA_Tools/build/matplotlib/lib/matplotlib/text.py | 1 | 69476 | """
Classes for including text in a figure.
"""
from __future__ import division
import math
import numpy as np
from matplotlib import cbook
from matplotlib import rcParams
import matplotlib.artist as artist
from matplotlib.artist import Artist
from matplotlib.cbook import is_string_like, maxdict
from matplotlib impor... | gpl-2.0 |
beiko-lab/gengis | bin/Lib/site-packages/scipy/interpolate/fitpack2.py | 1 | 53451 | """
fitpack --- curve and surface fitting with splines
fitpack is based on a collection of Fortran routines DIERCKX
by P. Dierckx (see http://www.netlib.org/dierckx/) transformed
to double routines by Pearu Peterson.
"""
# Created by Pearu Peterson, June,August 2003
from __future__ import division, print_funct... | gpl-3.0 |
afloren/nipype | nipype/pipeline/utils.py | 1 | 46477 | # 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 copy import deepcopy
from glob import glob
from collections import defaultdict
import os
import re
import numpy as np
from nipype.utils.misc import package... | bsd-3-clause |
olafhauk/mne-python | mne/viz/backends/_pyvista.py | 1 | 43775 | """
Core visualization operations based on PyVista.
Actual implementation of _Renderer and _Projection classes.
"""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Eric Larson <larson.eric.d@gmail.com>
# Guillaume Favelier <guillaume.favelier@gmail.com>
# Joan Massich <mailsik... | bsd-3-clause |
jseabold/statsmodels | statsmodels/genmod/cov_struct.py | 1 | 51133 | """
Covariance models and estimators for GEE.
Some details for the covariance calculations can be found in the Stata
docs:
http://www.stata.com/manuals13/xtxtgee.pdf
"""
from statsmodels.compat.pandas import Appender
from statsmodels.stats.correlation_tools import cov_nearest
import numpy as np
import pandas as pd
f... | bsd-3-clause |
mlindauer/asapy | asapy/perf_analysis/perf_analysis.py | 1 | 33556 | import logging
import os
import numpy as np
from scipy.stats import spearmanr
from scipy.cluster.hierarchy import linkage, dendrogram
from scipy.special import comb
from pandas import DataFrame
from sklearn.preprocessing import StandardScaler
from sklearn.decomposition import PCA
import matplotlib
matplotlib.use('... | mit |
quimaguirre/diana | scripts/old_scripts/tune_algorithm_with_clinicaltrials.py | 1 | 36723 | import argparse
import copy
import cPickle
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pylab
#from pylab import plot, show, savefig, xlim, figure, hold, ylim, legend, boxplot, setp, axes, xlabel, ylabel
import scipy
import time
import sys, os, re
from sklearn.decomposition import PCA
... | mit |
gfyoung/pandas | pandas/core/groupby/ops.py | 1 | 33812 | """
Provide classes to perform the groupby aggregate operations.
These are not exposed to the user and provide implementations of the grouping
operations, primarily in cython. These classes (BaseGrouper and BinGrouper)
are contained *in* the SeriesGroupBy and DataFrameGroupBy objects.
"""
from __future__ import annota... | bsd-3-clause |
phockett/ePSproc | epsproc/_sns_matrixMod.py | 1 | 49112 | """Seaborn functions to visualize matrices of data.
Seaborn - version from PR1393 with Cluster plot fixes.
https://github.com/mwaskom/seaborn/pull/1393
https://github.com/mwaskom/seaborn/blob/fb1f87e800e69ba2e9309f922f9dac470e3a6c78/seaborn/matrix.py
epsproc local version
PH 25/11/19
- Minor edits to imports to use... | gpl-3.0 |
Kortemme-Lab/kddg | kddg/api/monomer.py | 1 | 68257 | #!/usr/bin/python2.4
# encoding: utf-8
"""
monomer.py
High-level functions for interacting with the protein stability sections of the ddG database.
Classes:
MonomericStabilityDDGInterface - an class used to interface with the database. Call get_interface to get a user API based on this class.
AnalysisBreakdown - an cl... | mit |
Caoimhinmg/PmagPy | pmagpy/new_builder.py | 1 | 77768 | #!/usr/bin/env python
"""
This module is for creating or editing a MagIC contribution,
(or a piece of one).
You can build a contribution or an individual table from the ground up,
or you can read in one or more MagIC-format files.
You can also extract specific data from a table --
for instance, you can build a DIblock... | bsd-3-clause |
luwei0917/awsemmd_script | gg.py | 1 | 218519 | #!/usr/bin/env python
import os
import sys
import random
import time
from random import seed, randint
import argparse
import platform
from datetime import datetime
from myPersonalFunctions import *
import glob
from small_script.myFunctions import *
try:
OPENAWSEM_LOCATION = os.environ["OPENAWSEM_LOCATION"]
sys... | mit |
winklerand/pandas | pandas/tests/io/test_packers.py | 1 | 32230 | import pytest
from warnings import catch_warnings
import os
import datetime
import numpy as np
import sys
from distutils.version import LooseVersion
from pandas import compat
from pandas.compat import u, PY3
from pandas import (Series, DataFrame, Panel, MultiIndex, bdate_range,
date_range, period_... | bsd-3-clause |
eickenberg/scikit-learn | sklearn/metrics/classification.py | 1 | 47603 | """Metrics to assess performance on classification task given classe prediction
Functions named as ``*_score`` return a scalar value to maximize: the higher
the better
Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize:
the lower the better
"""
# Authors: Alexandre Gramfort <alexandre.gram... | bsd-3-clause |
ctogle/dilapidator | src/dilap/geometry/polymath.py | 1 | 39249 | from dilap.geometry.vec3 import vec3
import dilap.geometry.tools as gtl
import dilap.topology.planargraph as pgr
import dilap.core.plotting as dtl
import matplotlib.pyplot as plt
import numpy,math,random
import pdb
###############################################################################
# does one segmen... | mit |
DGrady/pandas | pandas/tests/test_base.py | 1 | 38698 | # -*- coding: utf-8 -*-
from __future__ import print_function
import re
import sys
from datetime import datetime, timedelta
import pytest
import numpy as np
import pandas as pd
import pandas.compat as compat
from pandas.core.dtypes.common import (
is_object_dtype, is_datetimetz,
needs_i8_conversion)
import pa... | bsd-3-clause |
fpavogt/pyqz | pyqz/pyqz.py | 1 | 65223 | # -*- coding: utf-8 -*-
'''
pyqz: a Python module to derive the ionization parameter and oxygen abundance of HII
regions, by comparing their strong emission line ratios with MAPPINGS photoionization
models.\n
Copyright (C) 2014-2016, F.P.A. Vogt
----------------------------------------------------------------... | gpl-3.0 |
magic2du/contact_matrix | Contact_maps/DeepLearning/DeepLearningTool/DL_contact_matrix_load2-new10fold_12_15_2014.py | 1 | 42941 |
# coding: utf-8
# In[3]:
import sys, os
sys.path.append('../../../libs/')
import os.path
import IO_class
from IO_class import FileOperator
from sklearn import cross_validation
import sklearn
import numpy as np
import csv
from dateutil import parser
from datetime import timedelta
from sklearn import svm
import numpy ... | gpl-2.0 |
mgunyho/pyspread | pyspread/src/gui/_main_window.py | 1 | 49133 | #!/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 |
LeeKamentsky/CellProfiler | cellprofiler/preferences.py | 1 | 54977 | """Preferences.py - singleton preferences for CellProfiler
TO-DO - load the default preferences from somewhere.
Create a function to save the preferences.
Create a function to populate a handles structure with preferences.
CellProfiler is distributed under the GNU General Public License.
See ... | gpl-2.0 |
dbednarski/pyhdust | pyhdust/fieldstars.py | 1 | 125153 | ##!/usr/bin/env python
#-*- coding:utf-8 -*-
"""
Tools for field stars
:author: D. Bednarski
:license: GNU GPL v3.0 (https://github.com/danmoser/pyhdust/blob/master/LICENSE)
"""
import os
import re
import csv
import copy
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
#import matplotlib.c... | gpl-3.0 |
daler/idr | idr/idr.py | 1 | 31255 | import os, sys
import gzip, io
import math
import numpy
from scipy.stats.stats import rankdata
from collections import namedtuple, defaultdict, OrderedDict
from itertools import chain
def mean(items):
items = list(items)
return sum(items)/float(len(items))
import idr
import idr.optimization
from idr.opt... | gpl-2.0 |
CamDavidsonPilon/lifelines | lifelines/tests/test_estimation.py | 1 | 233306 | # -*- coding: utf-8 -*-
import warnings
from io import StringIO, BytesIO as stringio
from collections.abc import Iterable
from itertools import combinations
from collections import Counter
import pickle
import os
import numpy as np
import pandas as pd
import pytest
from scipy.stats import weibull_min, norm, logistic... | mit |
herilalaina/scikit-learn | sklearn/decomposition/nmf.py | 8 | 45669 | """ Non-negative matrix factorization
"""
# Author: Vlad Niculae
# Lars Buitinck
# Mathieu Blondel <mathieu@mblondel.org>
# Tom Dupre la Tour
# License: BSD 3 clause
from __future__ import division, print_function
from math import sqrt
import warnings
import numbers
import time
import numpy ... | bsd-3-clause |
giaosudau/caravel | caravel/viz.py | 1 | 60060 | """This module contains the "Viz" objects
These objects represent the backend of all the visualizations that
Caravel can render.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import copy
import hashlib
import lo... | apache-2.0 |
eglxiang/Med | test_EvaluateDeepMed.py | 1 | 37228 | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 15 11:06:19 2016
@author: apezeshk
"""
from __future__ import print_function
import sys
import os
import time
import numpy as np
import theano
from theano.compile.debugmode import DebugMode
import SupportFuncs
import theano.tensor as T
from lasagne.layers import dnn
imp... | bsd-2-clause |
cloudera/ibis | ibis/backends/dask/tests/execution/test_operations.py | 1 | 30356 | import operator
from operator import methodcaller
import dask.array as da
import dask.dataframe as dd
import numpy as np
import numpy.testing as npt
import pandas as pd
import pytest
from dask.dataframe.utils import tm
import ibis
import ibis.expr.datatypes as dt
from ... import connect, execute
pytestmark = pytest... | apache-2.0 |
zack3241/incubator-airflow | airflow/contrib/hooks/bigquery_hook.py | 1 | 61615 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | apache-2.0 |
dsm054/pandas | pandas/tests/series/test_timeseries.py | 1 | 34682 | # coding=utf-8
# pylint: disable-msg=E1101,W0612
from datetime import datetime, time, timedelta
import numpy as np
import pytest
from pandas._libs.tslib import iNaT
from pandas.compat import StringIO, lrange, product
from pandas.errors import NullFrequencyError
import pandas.util._test_decorators as td
import panda... | bsd-3-clause |
simpace/simpace | simpace/utils/_utils.py | 1 | 32821 | from __future__ import print_function
import nibabel as nib
import numpy as np
import os.path as osp
import glob as gb
import scipy.linalg as lin
from six import string_types
import warnings
from collections import OrderedDict
# import matplotlib.pyplot as plt
# import nipy
# import json
# from warnings import warn
# ... | bsd-2-clause |
jreback/pandas | pandas/core/indexes/datetimes.py | 1 | 40696 | from datetime import date, datetime, time, timedelta, tzinfo
import operator
from typing import TYPE_CHECKING, Optional, Tuple
import warnings
import numpy as np
from pandas._libs import NaT, Period, Timestamp, index as libindex, lib
from pandas._libs.tslibs import (
Resolution,
ints_to_pydatetime,
parsin... | bsd-3-clause |
DavisLaboratory/prosperiti | prosperiti.py | 1 | 65864 | import os
import pandas as pd
import numpy as np
import networkx as nx
import matplotlib.pyplot as plt
import matplotlib.patheffects as path_effects
__author__ = 'Joe Cursons'
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# This python script ... | mit |
jor-/scipy | scipy/special/_basic.py | 1 | 66625 | #
# Author: Travis Oliphant, 2002
#
from __future__ import division, print_function, absolute_import
import operator
import numpy as np
import math
from scipy._lib.six import xrange
from numpy import (pi, asarray, floor, isscalar, iscomplex, real,
imag, sqrt, where, mgrid, sin, place, issubdtype,
... | bsd-3-clause |
lucashtnguyen/wqio | wqio/tests/utils_tests/misc_tests.py | 1 | 41568 | from collections import namedtuple
import warnings
import random
import sys
import os
from six import StringIO
import datetime
from pkg_resources import resource_filename
import nose.tools as nt
import numpy as np
import numpy.testing as nptest
from wqio import testing
usetex = False #testing.compare_versions(utilit... | bsd-3-clause |
nmayorov/scikit-learn | sklearn/metrics/tests/test_classification.py | 1 | 53047 | from __future__ import division, print_function
import numpy as np
from scipy import linalg
from functools import partial
from itertools import product
import warnings
from sklearn import datasets
from sklearn import svm
from sklearn.datasets import make_multilabel_classification
from sklearn.preprocessing import la... | bsd-3-clause |
pedvide/simetuc | simetuc/simulations.py | 1 | 68897 | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 9 14:22:41 2015
@author: Villanueva
"""
import time
import csv
import logging
import warnings
import os
from typing import List, Tuple, Iterator, Sequence, cast, Callable, Any, Union
import copy
with warnings.catch_warnings():
warnings.simplefilter("ignore")
im... | mit |
yeatmanlab/BrainTools | projects/NLR_MEG/connectivity_session1_ROI_3.py | 1 | 102121 | # -*- coding: utf-8 -*-
"""
Created on Tue Nov 15 12:05:40 2016
@author: sjjoo
"""
#%%
import sys
import mne
import matplotlib.pyplot as plt
import imageio
from mne.utils import run_subprocess, logger
import os
from os import path as op
import copy
import shutil
import numpy as np
from numpy.random import randn
from s... | bsd-3-clause |
breedlun/clearplot | clearplot/axes.py | 1 | 152574 | # -*- coding: utf-8 -*-
#Created on Sat Sep 20 11:31:00 2014
#@author: Benjamin Reedlunn
import matplotlib as _mpl
import matplotlib.pyplot as _plt
import numpy as _np
from copy import deepcopy
import warnings as _warnings
import matplotlib.patches as _mpl_patches
from matplotlib.path import Path as _mpl_Path
from mat... | mit |
pcubillos/MCcubed | MCcubed/plots/colormaps.py | 1 | 50870 | # New matplotlib colormaps by Nathaniel J. Smith, Stefan van der Walt,
# and (in the case of viridis) Eric Firing.
#
# This file and the colormaps in it are released under the CC0 license /
# public domain dedication. We would appreciate credit if you use or
# redistribute these colormaps, but do not impose any legal r... | mit |
giacomov/3ML | threeML/analysis_results.py | 1 | 53062 | from __future__ import print_function
from __future__ import division
from builtins import str
from builtins import map
from builtins import range
from builtins import object
from past.utils import old_div
import collections
import datetime
import functools
import inspect
import math
import astromodels
import astropy.... | bsd-3-clause |
kdebrab/pandas | pandas/core/ops.py | 1 | 60474 | """
Arithmetic operations for PandasObjects
This is not a public API.
"""
# necessary to enforce truediv in Python 2.X
from __future__ import division
import datetime
import operator
import textwrap
import warnings
import numpy as np
import pandas as pd
from pandas._libs import algos as libalgos, ops as libops
from... | bsd-3-clause |
gfyoung/pandas | pandas/io/html.py | 1 | 34509 | """
:mod:`pandas.io.html` is a module containing functionality for dealing with
HTML IO.
"""
from collections import abc
import numbers
import os
import re
from typing import Dict, List, Optional, Pattern, Sequence, Tuple, Union
from pandas._typing import FilePathOrBuffer
from pandas.compat._optional import import_o... | bsd-3-clause |
start-jsk/jsk_apc | jsk_apc2016_common/python/jsk_apc2016_common/rbo_segmentation/probabilistic_segmentation.py | 1 | 30350 | __author__ = 'rico jonschkowski'
import cv2
import scipy.ndimage
import numpy as np
from sklearn import preprocessing # @UnresolvedImport
from sklearn.svm import SVC # @UnresolvedImport
from sklearn.linear_model import LogisticRegression
from sklearn.preprocessing import PolynomialFeatures
from sklearn.pipeline imp... | bsd-3-clause |
EdFarrell/MilkMachine | src/MilkMachine/milkmachine.py | 1 | 202176 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
MilkMachine - QGIS Python Plugin for creating KML from GPS data
Copyright (C) 2014 by Ed Farrell, Sean K McGinnis, and polakvanbekkum
This program is free software: you can redistribute it and/or modify... | gpl-3.0 |
eig-2017/the-magical-csv-merge-machine | merge_machine/preprocess_fields_v3.py | 1 | 86581 | #!/usr/bin/env python3
# coding=utf-8
# Standard modules
import csv, itertools, re, logging, optparse, time, sys, math, os, unidecode
from functools import partial, reduce, lru_cache
from collections import defaultdict, Counter, Iterable
from operator import itemgetter, add
from fuzzywuzzy import fuzz
import stdnum.fr... | mit |
jkettleb/iris | lib/iris/tests/test_plot.py | 1 | 31916 | # (C) British Crown Copyright 2010 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris 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) any l... | lgpl-3.0 |
vinodkc/spark | python/pyspark/pandas/series.py | 1 | 193306 | #
# 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 |
StuartLittlefair/astropy | astropy/modeling/functional_models.py | 1 | 85223 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Mathematical models."""
# pylint: disable=line-too-long, too-many-lines, too-many-arguments, invalid-name
import numpy as np
from astropy import units as u
from astropy.units import Quantity, UnitsError
from astropy.utils.decorators import deprecated
... | bsd-3-clause |
BradHN1/HPAT | HeatPumpAnalysis-tkUi.py | 1 | 62176 | # Copyright (c) 2015 CSEC (Comprehensive Sustainable Energy Committee), Town of Concord
#
# 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 without limitation the... | gpl-2.0 |
barentsen/surveytools | surveytools/catalogue.py | 1 | 62470 | """Tools to create photometric catalogues from VPHAS data.
Classes
-------
VphasFrame
VphasOffsetCatalogue
Example command-line use
------------------------
Create a photometric catalogue of VPHAS pointing 0149a from the command-line:
```
$ vphas-offset-catalogue 0149a
```
Build an index table of catalogues created:
... | mit |
effigies/mne-python | doc/sphinxext/gen_rst.py | 3 | 33312 | #!/usr/bin/env python
# -*- coding: utf-8
"""
Example generation modified from the scikit learn
Generate the rst files for the examples by iterating over the python
example files.
Files that generate images should start with 'plot'
"""
from time import time
import os
import shutil
import traceback
import glob
impor... | bsd-3-clause |
peraktong/Cannon-Experiment | 0307_plot_all_new_ivar_bigger_0.py | 1 | 52091 |
import numpy as np
from astropy.table import Table
from astropy.io import fits
import matplotlib.pyplot as plt
import matplotlib
import pickle
from TheCannon_2 import dataset,apogee
from TheCannon_2 import model
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import Normalize
class Midpoi... | mit |
zhenwendai/RGP | examples/walk_run_2_alex.py | 1 | 41633 |
# coding: utf-8
# # Regression Example on Mocap data
# In[1]:
from __future__ import print_function
import autoreg
import GPy
import numpy as np
#from pylab import *
import tables
#from IPython.display import HTML
#get_ipython().magic(u'matplotlib inline')
from matplotlib import pyplot as plt
import os
#import pdb... | bsd-3-clause |
alephu5/Soundbyte | environment/lib/python3.3/site-packages/pandas/tseries/tests/test_offsets.py | 1 | 108782 | 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, CDay, BQuarterEnd, BMonthEnd, BYearEnd... | gpl-3.0 |
TomAugspurger/pandas | pandas/tests/groupby/test_grouping.py | 1 | 35091 | """ test where we are determining what we are grouping, or getting groups """
import numpy as np
import pytest
import pandas as pd
from pandas import (
CategoricalIndex,
DataFrame,
Index,
MultiIndex,
Series,
Timestamp,
date_range,
)
import pandas._testing as tm
from pandas.core.groupby.gro... | bsd-3-clause |
teonlamont/mne-python | mne/viz/ica.py | 2 | 37384 | """Functions to plot ICA specific data (besides topographies)."""
from __future__ import print_function
# Authors: Denis Engemann <denis.engemann@gmail.com>
# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Teon Brooks <teon.brooks@gmail.com>
#
# License: Simplified BSD
from functools... | bsd-3-clause |
ottogroup/dstoolbox | dstoolbox/tests/test_pipeline.py | 1 | 33355 | """Tests for pipeline.py."""
from functools import partial
import json
import pickle
import time
from unittest.mock import Mock
import numpy as np
import pandas as pd
from pandas.testing import assert_frame_equal
import pytest
from sklearn.datasets import make_classification
from sklearn.feature_extraction.text impor... | apache-2.0 |
danmoser/pyhdust | pyhdust/fieldstars.py | 1 | 106944 | ##!/usr/bin/env python
#-*- coding:utf-8 -*-
"""
Tools for field stars
:author: D. Bednarski
:license: GNU GPL v3.0 (https://github.com/danmoser/pyhdust/blob/master/LICENSE)
"""
from __future__ import print_function
import os
import re
import csv
import copy
import numpy as np
#import matplotlib.cm as mplcm
from iter... | gpl-3.0 |
Odingod/mne-python | mne/utils.py | 2 | 59265 |
# -*- coding: utf-8 -*-
"""Some utility functions"""
from __future__ import print_function
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
#
# License: BSD (3-clause)
import warnings
import logging
import time
from distutils.version import LooseVersion
import os
import os.path as op
from func... | bsd-3-clause |
meteoswiss-mdr/monti-pytroll | scripts/my_composites.py | 1 | 39996 | from __future__ import division
from __future__ import print_function
from mpop.imageo.geo_image import GeoImage
from copy import deepcopy
from trollimage.colormap import rdbu, greys, rainbow, spectral
import numpy as np
def hr_visual(self):
"""Make a High Resolution visual BW image composite from Seviri
chan... | lgpl-3.0 |
mlindauer/AutoFolio | autofolio/autofolio.py | 1 | 32683 | import logging
import functools
import traceback
import random
from itertools import tee
import pickle
import numpy as np
import pandas as pd
import yaml
from ConfigSpace.configuration_space import Configuration, \
ConfigurationSpace
from ConfigSpace.hyperparameters import CategoricalHyperparameter, \
Uniform... | bsd-2-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.