repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
hvasbath/beat | beat/heart.py | 1 | 115730 | """
Core module with functions to calculate Greens Functions and synthetics.
Also contains main classes for setup specific parameters.
"""
import os
import logging
import shutil
import copy
from time import time
from collections import OrderedDict
from beat import psgrn, pscmp, utility, qseis2d
from theano import co... | gpl-3.0 |
PatrickOReilly/scikit-learn | sklearn/ensemble/gradient_boosting.py | 1 | 73619 | """Gradient Boosted Regression Trees
This module contains methods for fitting gradient boosted regression trees for
both classification and regression.
The module structure is the following:
- The ``BaseGradientBoosting`` base class implements a common ``fit`` method
for all the estimators in the module. Regressio... | bsd-3-clause |
legacysurvey/obiwan | py/obiwan/kenobi.py | 1 | 46533 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
The Monte Carlo code that adds fake galaxiesto images from the Legacy Survey
"""
from __future__ import division, print_function
if __name__ == '__main__':
import matplotlib
matplotlib.use('Agg')
import h5py
import os
... | bsd-3-clause |
dinos66/termAnalysis | forTateDataset/oldScripts/termAnalysisDynamic - Copy.py | 1 | 64504 | # -*- coding: utf-8 -*-
'''
Create adjacency matrices and analyse terms dynamically
'''
print('Create dynamic adjacency matrices and ESOMs')
#--------------------------------------------
#run create_Info_Files.py before running this
#--------------------------------------------
import pickle, time, igraph, glob, os... | apache-2.0 |
e-q/scipy | scipy/integrate/_quadrature.py | 1 | 31815 | import functools
import numpy as np
import math
import types
import warnings
# trapz is a public function for scipy.integrate,
# even though it's actually a NumPy function.
from numpy import trapz
from scipy.special import roots_legendre
from scipy.special import gammaln
__all__ = ['fixed_quad', 'quadrature', 'romber... | bsd-3-clause |
eric-haibin-lin/mxnet | python/mxnet/numpy/random.py | 1 | 37033 | # 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 |
bnaul/scikit-learn | sklearn/manifold/_t_sne.py | 1 | 38942 | # Author: Alexander Fabisch -- <afabisch@informatik.uni-bremen.de>
# Author: Christopher Moody <chrisemoody@gmail.com>
# Author: Nick Travers <nickt@squareup.com>
# License: BSD 3 clause (C) 2014
# This is the exact and Barnes-Hut t-SNE implementation. There are other
# modifications of the algorithm:
# * Fast Optimi... | bsd-3-clause |
skjerns/AutoSleepScorerDev | keras_utils.py | 1 | 40188 | # -*- coding: utf-8 -*-
import os, sys
import time
import keras
import tools
import pickle
import models
import numpy as np
import matplotlib.pyplot as plt
import keras.backend.tensorflow_backend as K
from sklearn.utils import shuffle
from sklearn.metrics import f1_score, accuracy_score, confusion_matrix, log_loss
from... | gpl-3.0 |
dsm054/pandas | pandas/tests/reshape/merge/test_merge_asof.py | 1 | 39917 | import pytest
import pytz
import numpy as np
import pandas as pd
from pandas import (merge_asof, read_csv,
to_datetime, Timedelta)
from pandas.core.reshape.merge import MergeError
from pandas.util.testing import assert_frame_equal
class TestAsOfMerge(object):
def read_data(self, datapath, na... | bsd-3-clause |
michaelhush/M-LOOP | mloop/visualizations.py | 1 | 78293 | '''
Module of classes used to create visualizations of data produced by the experiment and learners.
'''
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import mloop.utilities as mlu
import mloop.learners as mll
import mloop.controllers as mlc
import numpy as np
import logging
imp... | mit |
rs2/pandas | pandas/core/arrays/datetimes.py | 1 | 77866 | from datetime import datetime, time, timedelta, tzinfo
from typing import Optional, Union
import warnings
import numpy as np
from pandas._libs import lib, tslib
from pandas._libs.tslibs import (
NaT,
NaTType,
Resolution,
Timestamp,
conversion,
fields,
get_resolution,
iNaT,
ints_to_... | bsd-3-clause |
bnaul/scikit-learn | sklearn/linear_model/_ridge.py | 2 | 74546 | """
Ridge regression
"""
# Author: Mathieu Blondel <mathieu@mblondel.org>
# Reuben Fletcher-Costin <reuben.fletchercostin@gmail.com>
# Fabian Pedregosa <fabian@fseoane.net>
# Michael Eickenberg <michael.eickenberg@nsup.org>
# License: BSD 3 clause
from abc import ABCMeta, abstractmethod
impor... | bsd-3-clause |
psi4/DatenQM | qcfractal/interface/models/rest_models.py | 1 | 45248 | """
Models for the REST interface
"""
import functools
import re
import warnings
from typing import Any, Dict, List, Optional, Tuple, Union
from pydantic import Field, constr, root_validator, validator
from qcelemental.util import get_base_docs
from .common_models import KeywordSet, Molecule, ObjectId, ProtoModel, KV... | bsd-3-clause |
zohannn/motion_manager | scripts/old/task_3_picking/var_1/predicting_task_3_var_1_10k.py | 1 | 280115 | #!/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 |
dmwelch/Py6S | Py6S/SixSHelpers/all_wavelengths.py | 1 | 30871 | # This file is part of Py6S.
#
# Copyright 2012 Robin Wilson and contributors listed in the CONTRIBUTORS file.
#
# Py6S 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, o... | gpl-3.0 |
yugangzhang/chx_backups | develop.py | 1 | 32745 | from __future__ import absolute_import, division, print_function
from databroker import DataBroker as db, get_images, get_table, get_events
from filestore.api import register_handler, deregister_handler
from filestore.retrieve import _h_registry, _HANDLER_CACHE
import numpy as np
import matplotlib as mpl
import matpl... | bsd-3-clause |
dtusar/coco | code-postprocessing/bbob_pproc/pproc.py | 3 | 103758 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Raw post-processing routines.
This module implements class :py:class:`DataSet`, unit element in the
post-processing and class :py:class:`DataSetList`, sequence of instances
of :py:class:`DataSet`.
Futhermore it implements methods for dealing with a third data structu... | bsd-3-clause |
smousavi05/EQTransformer | EQTransformer/core/mseed_predictor.py | 1 | 55164 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 21 21:55:54 2020
@author: mostafamousavi
last update: 05/27/2021
"""
from __future__ import print_function
from __future__ import division
import os
os.environ['KERAS_BACKEND']='tensorflow'
from tensorflow.keras import backend as K
from tensorflo... | mit |
iamahuman/angr | angr/knowledge_plugins/functions/function.py | 1 | 57108 | import os
import logging
import networkx
import string
import itertools
import pickle
from collections import defaultdict
from typing import Union
from itanium_demangler import parse
from cle.backends.symbol import Symbol
from archinfo.arch_arm import get_real_address_if_arm
import claripy
from ...protos import func... | bsd-2-clause |
sarajcev/nowcasting | nowcasting.py | 1 | 55031 |
# coding: utf-8
# ## Tracking and nowcasting of lightning flash-cells using data from the LINET network
# Analysis of lightning strike density distribution, clustering, cell-tracking, and nowcasting using open-source tools (Python).
# **Author**: Petar Sarajcev, PhD (petar.sarajcev@fesb.hr)
#
# University of Spli... | gpl-3.0 |
aerler/WRF-Projects | src/projects/WesternCanada/multimap.py | 1 | 57920 | '''
Created on 2012-11-05, adapted for PyGeoDat on 2013-10-10
A simple script that mushroomed into a complex module... reads a Datasets and displays them in a proper
geographic projection.
@author: Andre R. Erler, GPL v3
'''
## includes
from copy import copy # to copy map projection objects
# matplotlib config: siz... | gpl-3.0 |
tisimst/soerp | soerp/__init__.py | 1 | 41283 | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 9 15:48:17 2013
Overview
--------
The ``soerp`` package is the python equivalent of N. D. Cox's original SOERP
code written in Fortran. See the documentation in UncertainVariable for more
details and a reference to his work.
Credits
-------
A lot of code here was inspi... | bsd-3-clause |
bndl/bndl | bndl/compute/dataset.py | 1 | 77542 | # 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
# distributed under th... | apache-2.0 |
phobson/statsmodels | statsmodels/base/model.py | 1 | 79056 | from __future__ import print_function
from statsmodels.compat.python import iterkeys, lzip, range, reduce
import numpy as np
from scipy import stats
from statsmodels.base.data import handle_data
from statsmodels.tools.data import _is_using_pandas
from statsmodels.tools.tools import recipr, nan_dot
from statsmodels.stat... | bsd-3-clause |
CarlosA-Lopez/Proyecto_Embebidos_Grupo2 | plotly-1.2.9/plotly/matplotlylib/renderer.py | 1 | 30622 | """
Renderer Module
This module defines the PlotlyRenderer class and a single function,
fig_to_plotly, which is intended to be the main way that user's will interact
with the matplotlylib package.
"""
from __future__ import absolute_import
import warnings
from . mplexporter import Renderer
from . import mpltools
im... | unlicense |
kevin-intel/scikit-learn | sklearn/metrics/cluster/_supervised.py | 2 | 39526 | """Utilities to evaluate the clustering performance of models.
Functions named as *_score return a scalar value to maximize: the higher the
better.
"""
# Authors: Olivier Grisel <olivier.grisel@ensta.org>
# Wei LI <kuantkid@gmail.com>
# Diego Molla <dmolla-aliod@gmail.com>
# Arnaud Fouchet ... | bsd-3-clause |
mcflugen/topoflow | topoflow/components/met_base.py | 1 | 110614 |
## Does "land_surface_air__latent_heat_flux" make sense? (2/5/13)
# Copyright (c) 2001-2014, Scott D. Peckham
#
# Sep 2014. Fixed sign error in update_bulk_richardson_number().
# Ability to compute separate P_snow and P_rain.
# Aug 2014. New CSDMS Standard Names and clean up.
# Nov 2013. Con... | mit |
giorgiop/scikit-learn | sklearn/mixture/dpgmm.py | 2 | 35317 | """Bayesian Gaussian Mixture Models and
Dirichlet Process Gaussian Mixture Models"""
from __future__ import print_function
# Author: Alexandre Passos (alexandre.tp@gmail.com)
# Bertrand Thirion <bertrand.thirion@inria.fr>
#
# Based on mixture.py by:
# Ron Weiss <ronweiss@gmail.com>
# Fabian Ped... | bsd-3-clause |
Silmathoron/NNGT | nngt/plot/plt_networks.py | 1 | 70660 | #!/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 |
toobaz/pandas | pandas/tests/frame/test_axis_select_reindex.py | 2 | 42201 | from datetime import datetime
import re
import numpy as np
import pytest
from pandas.errors import PerformanceWarning
import pandas as pd
from pandas import Categorical, DataFrame, Index, MultiIndex, Series, date_range, isna
import pandas.util.testing as tm
from pandas.util.testing import assert_frame_equal
class ... | bsd-3-clause |
b-e-p/bep | Bep/package.py | 1 | 57428 | #! /usr/bin/env python
#----------------------------------------------------------------
# Author: Jason Gors <jasonDOTgorsATgmail>
# Creation Date: 07-30-2013
# Purpose: this specifies what types of packages can be handled: currently: git repos from github;
# git & hg repos from bitbucket; git, hg & bzr local... | bsd-3-clause |
6WIND/scapy | scapy/layers/inet.py | 1 | 71012 | # This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) Philippe Biondi <phil@secdev.org>
# This program is published under a GPLv2 license
"""
IPv4 (Internet Protocol v4).
"""
from __future__ import absolute_import
from __future__ import print_function
import time... | gpl-2.0 |
potash/scikit-learn | sklearn/metrics/classification.py | 1 | 71884 | """Metrics to assess performance on classification task given class 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.gramf... | bsd-3-clause |
huggingface/pytorch-transformers | tests/test_modeling_tapas.py | 1 | 44411 | # coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 |
jakereps/qiime2 | qiime2/metadata/tests/test_io.py | 1 | 42757 | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause |
Ciaran1981/geospatial-learn | geospatial_learn/convnet.py | 1 | 31539 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
The convnet module.
Description
-----------
A module for using pytorch to classify EO data for semantic segmentation and
object identification
"""
#from geospatial_learn import handyplots as hp
from geospatial_learn import raster as rs
from geospatial_learn.gdal_m... | gpl-3.0 |
cloudera/hue | desktop/core/ext-py/tabulate-0.8.9/tabulate.py | 2 | 62917 | # -*- coding: utf-8 -*-
"""Pretty-print tabular data."""
from __future__ import print_function
from __future__ import unicode_literals
from collections import namedtuple
import sys
import re
import math
if sys.version_info >= (3, 3):
from collections.abc import Iterable
else:
from collections... | apache-2.0 |
rustychris/stompy | stompy/model/delft/io.py | 1 | 60927 | import os
import glob
import subprocess
import copy
import datetime
import io # python io.
import numpy as np
import pandas as pd
import re
import xarray as xr
import six
from collections import defaultdict
from shapely import geometry
import logging
log=logging.getLogger('delft.io')
from ... import utils
def pars... | mit |
btgorman/RISE-power-water-ss-1phase | analysis_power_water_n1.py | 1 | 46660 | # Copyright 2017 Brandon T. Gorman
# 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... | apache-2.0 |
gojomo/gensim | gensim/utils.py | 1 | 66054 | #!/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... | lgpl-2.1 |
treverhines/PyGeoNS | pygeons/plot/ivector.py | 1 | 34600 | import matplotlib.pyplot as plt
import numpy as np
from pygeons.plot.quiver import Quiver
from matplotlib.cm import ScalarMappable
from matplotlib.colors import ListedColormap
from code import InteractiveConsole
import logging
import sys
import scipy.interpolate
from scipy.spatial import cKDTree
from textwrap import wr... | mit |
nborggren/zipline | zipline/algorithm.py | 1 | 53892 | #
# Copyright 2014 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 |
sauloal/cnidaria | scripts/venv/lib/python2.7/site-packages/pandas/tools/tests/test_pivot.py | 3 | 34143 | import datetime
import numpy as np
from numpy.testing import assert_equal
import pandas as pd
from pandas import DataFrame, Series, Index, MultiIndex, Grouper
from pandas.tools.merge import concat
from pandas.tools.pivot import pivot_table, crosstab
from pandas.compat import range, u, product
import pandas.util.testi... | mit |
tedmeeds/tcga_encoder | tcga_encoder/models/networks.py | 1 | 47703 | # import tensorflow as tf
# #from tensorflow import *
# from models.layers import *
# from models.regularizers import *
# from utils.utils import *
# from utils.definitions import *
from tcga_encoder.utils.helpers import *
import tensorflow as tf
from tcga_encoder.models.layers import *
from tcga_encoder.models.regul... | mit |
CWSL/access-cm-tools | grid/make_grids.py | 1 | 35131 | #!/usr/bin/env python
from __future__ import print_function
import sys, os
import argparse
import netCDF4 as nc
import numpy as np
import shlex
import shutil
import subprocess as sp
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
from regridder import Regridder
from mkancil import Mkancil
fr... | apache-2.0 |
roshantha9/AbstractManycoreSim | src/analyse_results/AnalyseResults_Exp_ACTest_MultiSeed_LargeRange.py | 1 | 37126 | import sys, os, csv, pprint, math
from collections import OrderedDict
import numpy as np
import random
import shutil
import math
import matplotlib
matplotlib.use('Qt4Agg')
import matplotlib.pyplot as plt
plt.style.use('bmh_rosh')
#from mpl_toolkits.mplot3d import Axes3D
import itertools
from itertools import cycle # ... | gpl-3.0 |
rsmailach/MultiServerSRPT | SRPTE_Multi_Scaled.py | 1 | 36576 | #----------------------------------------------------------------------#
# SRPTE.py
#
# This application simulates multiple servers with Poisson arrivals
# and processing times of a general distribution. There are errors in
# time estimates within a range. Jobs are serviced in order of shortest
# remaining processing ... | mit |
logust79/phenopolis | views/__init__.py | 1 | 57678 |
#flask import
from flask import Flask
from flask import session
from flask.ext.session import Session
from flask import Response
from flask import stream_with_context
from flask import request
from flask import make_response
from flask import request
from flask import send_file
from flask import g
from flask import re... | mit |
SKIRT/PTS | magic/sky/skysubtractor.py | 1 | 49497 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | agpl-3.0 |
nke001/attention-lvcsr | libs/Theano/theano/tensor/nnet/sigm.py | 1 | 33620 | """Ops and optimizations: sigmoid, softplus
These functions implement special cases of exp and log to improve numerical stability.
"""
from __future__ import print_function
import warnings
import numpy
import theano
from theano import config, gof, printing, scalar
from theano.compat import imap
from theano.configpa... | mit |
hrashk/sympy | sympy/utilities/runtests.py | 1 | 78211 | """
This is our testing framework.
Goals:
* it should be compatible with py.test and operate very similarly
(or identically)
* doesn't require any external dependencies
* preferably all the functionality should be in this file only
* no magic, just import the test file and execute the test functions, that's it
* po... | bsd-3-clause |
jmmease/pandas | pandas/tseries/offsets.py | 3 | 98163 | # -*- coding: utf-8 -*-
from datetime import date, datetime, timedelta
from pandas.compat import range
from pandas import compat
import numpy as np
from pandas.core.dtypes.generic import ABCSeries, ABCDatetimeIndex, ABCPeriod
from pandas.core.tools.datetimes import to_datetime, normalize_date
from pandas.core.common i... | bsd-3-clause |
trislett/TFCE_mediation | tfce_mediation/pyfunc.py | 1 | 98480 | #!/usr/bin/env python
# Various functions for TFCE_mediation
# Copyright (C) 2016 Tristram Lett, Lea Waller
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of ... | gpl-3.0 |
ProfessorX/Config | .PyCharm30/system/python_stubs/-1247972723/numpy/random/mtrand.py | 1 | 349287 | # encoding: utf-8
# module numpy.random.mtrand
# from /usr/lib/python2.7/dist-packages/numpy/random/mtrand.so
# by generator 1.135
# no doc
# imports
import operator as operator # <module 'operator' (built-in)>
import numpy as np # /usr/lib/python2.7/dist-packages/numpy/__init__.pyc
import __builtin__ as __builtins__ ... | gpl-2.0 |
ominux/scikit-learn | sklearn/cross_validation.py | 1 | 32337 | """Utilities for cross validation and performance evaluation"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>,
# Gael Varoquaux <gael.varoquaux@normalesup.org>,
# Olivier Grisel <olivier.grisel@ensta.org>
# License: BSD Style.
from math import ceil
import operator
import numpy as np
fro... | bsd-3-clause |
pravsripad/mne-python | mne/viz/evoked.py | 2 | 108702 | # -*- coding: utf-8 -*-
"""Functions to plot evoked M/EEG data (besides topographies)."""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
# C... | bsd-3-clause |
bioconda/bioconda-utils | bioconda_utils/bioconductor_skeleton.py | 1 | 47769 | """
Conda Skeleton for Bioconductor Recipes
"""
import shutil
import tempfile
import configparser
from textwrap import dedent
import tarfile
import hashlib
import os
import re
from collections import OrderedDict
import logging
import bs4
import pyaml
import requests
import yaml
import networkx as nx
import itertools
... | mit |
webmasterraj/GaSiProMo | flask/lib/python2.7/site-packages/pandas/tests/test_groupby.py | 2 | 196095 | # -*- coding: utf-8 -*-
from __future__ import print_function
import nose
from numpy.testing.decorators import slow
from datetime import datetime
from numpy import nan
from pandas import date_range,bdate_range, Timestamp
from pandas.core.index import Index, MultiIndex, Int64Index
from pandas.core.api import Categori... | gpl-2.0 |
aburgasser/splat | splat/initialize.py | 1 | 152344 | # -*- coding: utf-8 -*-
from __future__ import print_function, division
"""
.. note::
These commands initialize the SPLAT code
"""
import os
import sys
import numpy
import pandas
from astropy import units as u
# program constants
VERSION = '2021.02.24'
__version__ = VERSION
SPLAT_URL = 'http://splat.physi... | mit |
rousseab/pymatgen | pymatgen/io/abinitio/tasks.py | 1 | 145341 | # coding: utf-8
"""This module provides functions and classes related to Task objects."""
from __future__ import division, print_function, unicode_literals
import os
import time
import datetime
import shutil
import collections
import abc
import copy
import yaml
import six
import numpy as np
from pprint import pprint
... | mit |
LeiDai/meep_metamaterials | meep_utils.py | 1 | 40785 | #!/usr/bin/env python
#coding:utf8
"""
Here you can find various functions and classes that facilitate the work with python-meep.
I believe some of these functions ought to be implemented in the meep module.
Filip Dominec 2012-2013
"""
import numpy as np
import os, os.path, sys, subprocess, time
from scipy.constants i... | mit |
dssg/wikienergy | disaggregator/build/pandas/pandas/tseries/tests/test_timezones.py | 1 | 50449 | # pylint: disable-msg=E1101,W0612
from datetime import datetime, timedelta, tzinfo, date
import sys
import os
import nose
import numpy as np
import pytz
from pandas import (Index, Series, DataFrame, isnull, Timestamp)
from pandas import DatetimeIndex, to_datetime, NaT
from pandas import tslib
import pandas.core.dat... | mit |
gfabieno/SeisCL | SeisCL/SeisCL.py | 1 | 40262 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Interface to SeisCL
"""
import h5py as h5
import numpy as np
import subprocess
import os
import shutil
from obspy.core import Trace, Stream
from obspy.io.segy.segy import _read_segy
import matplotlib as mpl
from matplotlib.patches import Rectangle
import matplotlib.py... | gpl-3.0 |
GuessWhoSamFoo/pandas | pandas/tests/frame/test_indexing.py | 1 | 131238 | # -*- coding: utf-8 -*-
from __future__ import print_function
from datetime import date, datetime, time, timedelta
from warnings import catch_warnings, simplefilter
import numpy as np
import pytest
from pandas._libs.tslib import iNaT
from pandas.compat import long, lrange, lzip, map, range, zip
from pandas.core.dt... | bsd-3-clause |
plotly/plotly.py | packages/python/plotly/plotly/graph_objs/_box.py | 1 | 117600 | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Box(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "box"
_valid_props = {
"alignmentgroup",
"boxmean",
"boxpoints",
"customdata... | mit |
Matrixeigs/Optimization | energy_hub/bidding_strategy/three_stage_bidding.py | 1 | 35020 | """
Three stage bidding based on the gurobi
"""
from numpy import zeros, ones, array, eye, hstack, vstack, inf, transpose, where
import numpy as np
from gurobipy import *
from matplotlib import pyplot
from scipy import stats
def main(N_scenario_first_stage=100, N_scenario_second_stage=1000):
# 1) System level co... | mit |
nicproulx/mne-python | mne/preprocessing/maxwell.py | 2 | 81142 | # -*- coding: utf-8 -*-
# Authors: Mark Wronkiewicz <wronk.mark@gmail.com>
# Eric Larson <larson.eric.d@gmail.com>
# Jussi Nurminen <jnu@iki.fi>
# License: BSD (3-clause)
from functools import partial
from math import factorial
from os import path as op
import numpy as np
from scipy import linalg
... | bsd-3-clause |
sparklingpandas/sparklingml | sparklingml/feature/lucene_analyzers.py | 1 | 72950 | #
# 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 |
gahoo/SNAP | core/models.py | 1 | 92188 | from sqlalchemy import Column, Integer, Float, String, DateTime, Boolean, ForeignKey, create_engine, Table
from sqlalchemy.schema import UniqueConstraint
from sqlalchemy.orm import sessionmaker, relationship
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm.exc import NoResultFound
from sqlalc... | mit |
cython-testbed/pandas | pandas/tests/sparse/test_indexing.py | 1 | 41244 | # pylint: disable-msg=E1101,W0612
import pytest
import numpy as np
import pandas as pd
import pandas.util.testing as tm
from pandas.core.sparse.api import SparseDtype
class TestSparseSeriesIndexing(object):
def setup_method(self, method):
self.orig = pd.Series([1, np.nan, np.nan, 3, np.nan])
sel... | bsd-3-clause |
StephanEwen/incubator-flink | flink-python/pyflink/table/tests/test_pandas_udaf.py | 1 | 34368 | ################################################################################
# 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 |
etraiger/PCWG | dataset.py | 1 | 33956 | import pandas as pd
import numpy as np
import datetime
import math
import configuration
import rews
import binning
import warnings
warnings.simplefilter('ignore', np.RankWarning)
def getSeparatorValue(separator):
try:
return {"TAB":"\t",
"SPACE":" ",
"COMMA": ",",
... | mit |
fraserw/wcsMatrixSolver | wcsMatrixSolver.py | 1 | 35543 | #! /usr/bin/env pythonw
import astropy.io.fits as fits
from astropy import wcs as WCS
import numpy as np
from numpy import linalg
from trippy import scamp
from os import path
import os, sys
import pylab as pyl
from astropy.visualization import interval
import numdisplay
from matplotlib.patches import Circle
from matpl... | gpl-3.0 |
cjayb/mne-python | mne/preprocessing/tests/test_ica.py | 2 | 50459 | # Author: Denis Engemann <denis.engemann@gmail.com>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
#
# License: BSD (3-clause)
from itertools import product
import os
import os.path as op
from unittest import SkipTest
import pytest
import numpy as np
from numpy.testing import (assert_array_almost_equal, a... | bsd-3-clause |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/dask/dataframe/io/parquet.py | 2 | 41179 | from __future__ import absolute_import, division, print_function
import re
import copy
import json
import os
from distutils.version import LooseVersion
import numpy as np
import pandas as pd
from ..core import DataFrame, Series
from ..utils import (clear_known_categories, strip_unknown_categories,
... | gpl-3.0 |
bdh1011/wau | venv/lib/python2.7/site-packages/pandas/io/sql.py | 1 | 60727 | # -*- coding: utf-8 -*-
"""
Collection of query wrappers / abstractions to both facilitate data
retrieval and to reduce dependency on DB-specific API.
"""
from __future__ import print_function, division
from datetime import datetime, date
import warnings
import traceback
import re
import numpy as np
import pandas.li... | mit |
e-koch/pyspeckit | pyspeckit/spectrum/fitters.py | 1 | 94527 | 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 |
vpoggi/catalogue_toolkit | eqcat/utils.py | 1 | 100101 | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# LICENSE
#
# Copyright (c) 2015 GEM Foundation
#
# The Catalogue Toolkit is free software: you can redistribute
# it and/or modify it under the terms of the GNU Affero General Public
# License as published by the Free Software Foundation, either ... | agpl-3.0 |
GuessWhoSamFoo/pandas | pandas/core/dtypes/cast.py | 1 | 43577 | """ routings for casting """
from datetime import datetime, timedelta
import numpy as np
from pandas._libs import lib, tslib, tslibs
from pandas._libs.tslibs import NaT, OutOfBoundsDatetime, Period, iNaT
from pandas.compat import PY3, string_types, text_type, to_str
from .common import (
_INT64_DTYPE, _NS_DTYPE... | bsd-3-clause |
mganeva/mantid | scripts/Engineering/EnginX.py | 1 | 32950 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | gpl-3.0 |
henry0312/LightGBM | tests/python_package_test/test_engine.py | 1 | 117437 | # coding: utf-8
import copy
import itertools
import math
import os
import pickle
import platform
import random
import numpy as np
import psutil
import pytest
from scipy.sparse import csr_matrix, isspmatrix_csc, isspmatrix_csr
from sklearn.datasets import load_svmlight_file, make_multilabel_classification
from sklearn.... | mit |
harisbal/pandas | pandas/tests/frame/test_timeseries.py | 1 | 30003 | # -*- coding: utf-8 -*-
from __future__ import print_function
from datetime import datetime, time
import pytest
from numpy import nan
from numpy.random import randn
import numpy as np
from pandas import (DataFrame, Series, Index,
Timestamp, DatetimeIndex, MultiIndex,
to_date... | bsd-3-clause |
blitzmann/Pyfa | gui/mainFrame.py | 1 | 38605 | # =============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of pyfa.
#
# pyfa 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 |
sidtechnical/ALTwitter | scripts/generate_individual_metainfo_page.py | 1 | 53530 | #!/usr/bin/env python
from __future__ import unicode_literals
from tqdm import tqdm
import tweepy
import numpy
import argparse
import collections
from collections import OrderedDict
import datetime
import matplotlib.pyplot as plt
from bs4 import BeautifulSoup
import urlparse
import urllib
import os.path
import gc
... | gpl-3.0 |
yuxng/Deep_ISM | Rendering/blender_renderer.py | 1 | 40519 | #!/usr/bin/env python3
import os
import random
import bpy
import bpy_extras
from mathutils import Matrix, Vector
import math
import numpy as np
import scipy.io
import pickle
import png
RENDERING_PATH = './'
MAX_CAMERA_DIST = 2
MAX_DEPTH = 1e8
FACTOR_DEPTH = 10000
g_shape_synset_name_pairs = [('02691156', 'aeroplane')... | mit |
jreback/pandas | pandas/tests/internals/test_internals.py | 1 | 41441 | from datetime import date, datetime
import itertools
import re
import numpy as np
import pytest
from pandas._libs.internals import BlockPlacement
import pandas as pd
from pandas import Categorical, DataFrame, DatetimeIndex, Index, Series
import pandas._testing as tm
import pandas.core.algorithms as algos
from pandas... | bsd-3-clause |
gfyoung/pandas | pandas/tests/frame/test_reductions.py | 2 | 52992 | from datetime import timedelta
from decimal import Decimal
from dateutil.tz import tzlocal
import numpy as np
import pytest
from pandas.compat import is_platform_windows
import pandas.util._test_decorators as td
import pandas as pd
from pandas import (
Categorical,
DataFrame,
Index,
MultiIndex,
S... | bsd-3-clause |
eickenberg/scikit-learn | sklearn/ensemble/forest.py | 1 | 54513 | """Forest of trees-based ensemble methods
Those methods include random forests and extremely randomized trees.
The module structure is the following:
- The ``BaseForest`` base class implements a common ``fit`` method for all
the estimators in the module. The ``fit`` method of the base ``Forest``
class calls the ... | bsd-3-clause |
christobal54/aei-grad-school | bin/neon-classification.py | 1 | 41924 | #
# script to build species ID models from NEON reflectance data
#####
# package imports
#import aei
import copy
#import plotly
import pickle
import numpy as np
import pandas as pd
import seaborn as sns
from sklearn import svm
from sklearn import metrics
from sklearn import ensemble
from sklearn import multiclass
from... | mit |
rohit21122012/DCASE2013 | runs/2013/dnnmfccgd/dnn6.py | 1 | 33628 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# DCASE 2016::Acoustic Scene Classification / Baseline System
#import sys
#sys.path.insert(0, '../')
from src.ui import *
from src.general import *
from src.files import *
from src.features import *
from src.dataset import *
from src.evaluation import *
import numpy
im... | mit |
PSFCPlasmaTools/eqtools | eqtools/TCVLIUQE.py | 1 | 46681 | # This program is distributed under the terms of the GNU General Purpose License (GPL).
# Refer to http://www.gnu.org/licenses/gpl.txt
#
# This file is part of EqTools.
#
# EqTools is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the... | gpl-3.0 |
kdebrab/pandas | pandas/core/indexes/base.py | 1 | 170566 | 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, tslibs,
algos as libalgos, join as libjoin,
Timedelta)
from pandas._libs.lib import is_datetime_a... | bsd-3-clause |
ajylee/gpaw-rtxs | gpaw/transport/analysor.py | 1 | 53568 | from gpaw.transport.selfenergy import LeadSelfEnergy
from gpaw.transport.tools import get_matrix_index, aa1d, aa2d, sum_by_unit, \
dot, fermidistribution, eig_states_norm, \
find, get_atom_indices, dagger, \
write, gather_nd... | gpl-3.0 |
xuewei4d/scikit-learn | sklearn/metrics/_classification.py | 5 | 96987 | """Metrics to assess performance on classification task given class 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.gr... | bsd-3-clause |
rivtools/Criv | model/xsection_rivaq.py | 1 | 30137 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
xsection.rivaq.py
CRIVapp
This file gather functions which provide pre- and post-processing of the
numerical model which provide the "river-coefficient" and Xfar.
Grid of the... | bsd-3-clause |
MDAnalysis/mdanalysis | package/MDAnalysis/analysis/encore/similarity.py | 1 | 63616 | # -*- 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-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
# Released under t... | gpl-2.0 |
kevin-intel/scikit-learn | sklearn/model_selection/_split.py | 3 | 90027 | """
The :mod:`sklearn.model_selection._split` module includes classes and
functions to split the data based on a preset strategy.
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# Olivier Grisel <olivier.grisel@ensta.org>
# Raghav ... | bsd-3-clause |
arikpoz/deep-visualization-toolbox | find_maxes/max_tracker.py | 1 | 47570 | #! /usr/bin/env python
import errno
import os
import sys
from datetime import datetime
import cv2
import numpy as np
from misc import mkdir_p, get_files_list
from image_misc import resize_without_fit
from caffe_misc import RegionComputer, save_caffe_image, get_max_data_extent, extract_patch_from_image, \
compute_... | mit |
ssanderson/dask | dask/dataframe/core.py | 1 | 82429 | from __future__ import division
import bisect
from collections import Iterable, Iterator
from datetime import datetime
from distutils.version import LooseVersion
from functools import wraps
import operator
from operator import getitem, setitem
from pprint import pformat
import uuid
from toolz import merge, partial, f... | bsd-3-clause |
kundajelab/genomedisco | genomedisco/concordance_utils.py | 1 | 53614 | from __future__ import print_function
import argparse
import os
import re
import subprocess as subp
import gzip
import numpy as np
from time import gmtime, strftime
import sys
import copy
import fnmatch
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from pylab import rcParams
global repo_dir
... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.