repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
mcs07/PubChemPy | pubchempy.py | 1 | 48469 | # -*- coding: utf-8 -*-
"""
PubChemPy
Python interface for the PubChem PUG REST service.
https://github.com/mcs07/PubChemPy
"""
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import functools
import json
import logging
import os
import sys
import time
im... | mit |
dssg/wikienergy | disaggregator/build/pandas/pandas/tests/test_multilevel.py | 1 | 86025 | # -*- coding: utf-8 -*-
# pylint: disable-msg=W0612,E1101,W0141
import datetime
import itertools
import nose
from numpy.random import randn
import numpy as np
from pandas.core.index import Index, MultiIndex
from pandas import Panel, DataFrame, Series, notnull, isnull, Timestamp
from pandas.util.testing import (asser... | mit |
otmaneJai/Zipline | tests/test_algorithm.py | 1 | 62546 | #
# 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 |
kdebrab/pandas | pandas/core/algorithms.py | 1 | 60653 | """
Generic data algorithms. This module is experimental at the moment and not
intended for public consumption
"""
from __future__ import division
from warnings import warn, catch_warnings
from textwrap import dedent
import numpy as np
from pandas.core.dtypes.cast import (
maybe_promote, construct_1d_object_array... | bsd-3-clause |
great-expectations/great_expectations | tests/data_context/test_data_context_test_yaml_config.py | 1 | 37993 | import datetime
import json
import os
import tempfile
from unittest import mock
import pytest
import great_expectations.exceptions as ge_exceptions
from great_expectations import DataContext
from great_expectations.core import ExpectationSuite
from great_expectations.data_context.store import CheckpointStore
from gre... | apache-2.0 |
mkukielka/oddt | oddt/toolkits/ob.py | 1 | 35653 | from __future__ import print_function
# All functions using f2py need to be loaded before pybel/openbabel,
# otherwise it will segfault.
# See BUG report: https://github.com/numpy/numpy/issues/1746
from scipy.optimize import fmin_l_bfgs_b
from itertools import chain
from subprocess import check_output
import warnings... | bsd-3-clause |
winklerand/pandas | pandas/tests/test_multilevel.py | 1 | 106143 | # -*- coding: utf-8 -*-
# pylint: disable-msg=W0612,E1101,W0141
from warnings import catch_warnings
import datetime
import itertools
import pytest
import pytz
from numpy.random import randn
import numpy as np
from pandas.core.index import Index, MultiIndex
from pandas import Panel, DataFrame, Series, notna, isna, Tim... | bsd-3-clause |
wdurhamh/statsmodels | statsmodels/tsa/statespace/tests/test_representation.py | 1 | 41399 | """
Tests for python wrapper of state space representation and filtering
Author: Chad Fulton
License: Simplified-BSD
References
----------
Kim, Chang-Jin, and Charles R. Nelson. 1999.
"State-Space Models with Regime Switching:
Classical and Gibbs-Sampling Approaches with Applications".
MIT Press Books. The MIT Press... | bsd-3-clause |
ColdMatter/EDMSuite | MoleculeMOTScripts/analysis3.py | 1 | 60116 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 15 06:30:01 2019
@author: arijit
"""
from __future__ import print_function
import numpy as np
import os,zipfile
from PIL import Image
from scipy.optimize import curve_fit
from scipy import optimize
from scipy.signal import savgol_filter
import matp... | mit |
quantopian/zipline | tests/finance/test_slippage.py | 1 | 43716 | #
# Copyright 2017 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 |
moreati/python-niceware | niceware/wordlist.py | 1 | 804814 | # flake8: noqa E122
# 2^16 English wordlist. Derived from
# https://github.com/diracdeltas/niceware/blob/master/lib/wordlist.js
# which in turn, is derived from
# http://www-01.sil.org/linguistics/wordlists/english/.
# Originally compiled for the Yahoo End-to-End project.
# https://github.com/yahoo/end-to-end
WORD_LI... | mit |
rbharath/deepchem | deepchem/data/datasets.py | 1 | 34129 | """
Contains wrapper class for datasets.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import os
import numpy as np
import pandas as pd
import random
from deepchem.utils.save import save_to_disk
from deepchem.utils.save import load_from_disk
from deepc... | mit |
rabrahm/ceres | harps/harpspipe.py | 1 | 75338 | import sys
import matplotlib
matplotlib.use("Agg")
from pylab import *
base = '../'
sys.path.append(base+"utils/Correlation")
sys.path.append(base+"utils/OptExtract")
sys.path.append(base+"utils/GLOBALutils")
baryc_dir= base+'utils/SSEphem/'
sys.path.append(baryc_dir)
ephemeris='DEc403'
import matplotlib.pyplot as... | mit |
desihub/desitarget | py/desitarget/brightmask.py | 1 | 42013 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
desitarget.brightmask
=====================
Module for studying and masking bright sources in the sweeps
.. _`Tech Note 2346`: https://desi.lbl.gov/DocDB/cgi-bin/private/ShowDocument?docid=2346
.. _`Tech Note 2348`: https://de... | bsd-3-clause |
GuessWhoSamFoo/pandas | pandas/tests/computation/test_eval.py | 1 | 70557 | from distutils.version import LooseVersion
from itertools import product
import operator
import warnings
import numpy as np
from numpy.random import rand, randint, randn
import pytest
from pandas.compat import PY3, reduce
from pandas.errors import PerformanceWarning
import pandas.util._test_decorators as td
from pan... | bsd-3-clause |
ozsolarwind/siren | powerplot.py | 1 | 66885 | #!/usr/bin/python3
#
# Copyright (C) 2019-2021 Sustainable Energy Now Inc., Angus King
#
# powerplot.py - This file is possibly part of SIREN.
#
# SIREN 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 Foundati... | agpl-3.0 |
adazey/Muzez | libs/nltk/sentiment/util.py | 1 | 31750 | # coding: utf-8
#
# Natural Language Toolkit: Sentiment Analyzer
#
# Copyright (C) 2001-2016 NLTK Project
# Author: Pierpaolo Pantone <24alsecondo@gmail.com>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
Utility methods for Sentiment Analysis.
"""
from copy import deepcopy
imp... | gpl-3.0 |
samuelshaner/openmc | openmc/tallies.py | 1 | 137276 | from __future__ import division
from collections import Iterable, MutableSequence
import copy
from functools import partial
import os
import pickle
import itertools
from numbers import Integral, Real
import sys
import warnings
from xml.etree import ElementTree as ET
from six import string_types
import numpy as np
im... | mit |
tknapen/rewardUP | RewardUPGroupLevel.py | 1 | 64997 | from __future__ import division
#!/usr/bin/env python
# encoding: utf-8
"""
EyeLinkSession.py
Created by Tomas Knapen on 2011-04-27.
Copyright (c) 2011 __MyCompanyName__. All rights reserved.
"""
import os, sys, datetime, pickle
import math
import numpy as np
import scipy as sp
import scipy.stats as stats
import ma... | gpl-2.0 |
ntung/ramp | gaussian_process_no_normalization_of_inputs.py | 1 | 34661 | # -*- coding: utf-8 -*-
# Author: Vincent Dubourg <vincent.dubourg@gmail.com>
# (mostly translation, see implementation details)
# Licence: BSD 3 clause
from __future__ import print_function
import numpy as np
from scipy import linalg, optimize
from sklearn.base import BaseEstimator, RegressorMixin
from skl... | bsd-3-clause |
syedjafri/ThinkStats2 | code/thinkstats2.py | 1 | 68257 | """This file contains code for use with "Think Stats" and
"Think Bayes", both by Allen B. Downey, available from greenteapress.com
Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function, division
"""This file contains class definitions for:
H... | gpl-3.0 |
amolkahat/pandas | pandas/core/indexes/base.py | 1 | 173995 | 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 |
nicproulx/mne-python | mne/viz/topomap.py | 2 | 90723 | """Functions to plot M/EEG data e.g. topographies."""
from __future__ import print_function
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com... | bsd-3-clause |
allisony/pyspeckit | pyspeckit/spectrum/showspec.py | 1 | 50249 | """
showspec is my homegrown spectrum plotter, meant to somewhat follow STARLINK's
SPLAT and have functionality similar to GAIA, but with an emphasis on producing
publication-quality plots (which, while splat may do, it does unreproducibly)
TO DO:
-add spectrum arithmetic tools
(as is, you can use numpy.i... | mit |
timsnyder/bokeh | bokeh/plotting/helpers.py | 1 | 33191 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause |
ddandur/Twords | twords/twords.py | 1 | 51179 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import datetime
import string
from os import listdir
from os.path import join as pathjoin
from math import log, ceil
import subprocess
import pandas as pd
import nltk
from nltk.corpus import stopwords
import matplotlib.pyplot as plt
import tailer
from ttp import t... | mit |
jdmcbr/geopandas | geopandas/geoseries.py | 1 | 40294 | import json
import warnings
import numpy as np
import pandas as pd
from pandas import Series, MultiIndex
from pandas.core.internals import SingleBlockManager
from pyproj import CRS
from shapely.geometry.base import BaseGeometry
from geopandas.base import GeoPandasBase, _delegate_property
from geopandas.plotting impo... | bsd-3-clause |
kluksa/validacija_aplikacija | app/view/canvas.py | 1 | 66604 | # -*- coding: utf-8 -*-
import os
import logging
import datetime
import functools
import numpy as np
import pandas as pd
from PyQt4 import QtCore, QtGui
import matplotlib
from matplotlib import gridspec
from matplotlib.figure import Figure
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as F... | gpl-3.0 |
alephu5/Soundbyte | environment/lib/python3.3/site-packages/matplotlib/colorbar.py | 1 | 47848 | '''
Colorbar toolkit with two classes and a function:
:class:`ColorbarBase`
the base class with full colorbar drawing functionality.
It can be used as-is to make a colorbar for a given colormap;
a mappable object (e.g., image) is not needed.
:class:`Colorbar`
the derived class ... | gpl-3.0 |
gengliangwang/spark | python/pyspark/pandas/series.py | 1 | 191269 | #
# 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 |
anntzer/scikit-learn | sklearn/linear_model/_logistic.py | 1 | 84471 | """
Logistic Regression
"""
# Author: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Fabian Pedregosa <f@bianp.net>
# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Manoj Kumar <manojkumarsivaraj334@gmail.com>
# Lars Buitinck
# Simon Wu <s8wu@uwaterloo.ca>
# ... | bsd-3-clause |
great-expectations/great_expectations | great_expectations/dataset/sqlalchemy_dataset.py | 1 | 85651 | import inspect
import logging
import traceback
import uuid
import warnings
from datetime import datetime
from functools import wraps
from typing import Dict, Iterable, List
import numpy as np
import pandas as pd
from dateutil.parser import parse
from great_expectations.core.util import (
convert_to_json_serializa... | apache-2.0 |
yl565/statsmodels | statsmodels/tsa/statespace/tests/test_sarimax.py | 1 | 76262 | """
Tests for SARIMAX models
Author: Chad Fulton
License: Simplified-BSD
"""
from __future__ import division, absolute_import, print_function
import numpy as np
import pandas as pd
import os
import warnings
from statsmodels.tsa.statespace import sarimax, tools
from statsmodels.tsa import arima_model as arima
from .r... | bsd-3-clause |
IntelLabs/hpat | sdc/hiframes/hiframes_untyped.py | 1 | 88759 | # *****************************************************************************
# Copyright (c) 2020, Intel Corporation All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of sou... | bsd-2-clause |
zuku1985/scikit-learn | sklearn/model_selection/tests/test_search.py | 2 | 47337 | """Test the search module"""
from collections import Iterable, Sized
from sklearn.externals.six.moves import cStringIO as StringIO
from sklearn.externals.six.moves import xrange
from sklearn.externals.joblib._compat import PY3_OR_LATER
from itertools import chain, product
import pickle
import sys
import numpy as np
i... | bsd-3-clause |
datapythonista/pandas | pandas/core/reshape/reshape.py | 1 | 36068 | from __future__ import annotations
import itertools
from typing import (
TYPE_CHECKING,
cast,
)
import numpy as np
import pandas._libs.reshape as libreshape
from pandas._libs.sparse import IntIndex
from pandas._typing import Dtype
from pandas.util._decorators import cache_readonly
from pandas.core.dtypes.ca... | bsd-3-clause |
sot/mica | mica/centroid_dashboard.py | 1 | 41251 | #!/usr/bin/env python
import os
import numpy as np
from glob import glob
# Matplotlib setup
# Use Agg backend for command-line (non-interactive) operation
import matplotlib
if __name__ == '__main__':
matplotlib.use('Agg')
import matplotlib.pylab as plt
from kadi import events
from chandra_aca.centroid_resid impo... | bsd-3-clause |
afraser/CellProfiler-Analyst | cpa/classifier.py | 1 | 67988 | # Encoding: utf-8
from __future__ import with_statement
# This must come first for py2app/py2exe
import matplotlib
matplotlib.use('WXAgg')
from datatable import DataGrid
import tableviewer
from datamodel import DataModel
from imagecontrolpanel import ImageControlPanel
from plateviewer import PlateViewer
from propertie... | gpl-2.0 |
sanromd/emclaw | emclaw/utils/materials.py | 1 | 37885 | import numpy as np
import pickle
import os
dim = {}
dim['xyz'] = [0, 1, 2]
dim['xy' ] = [0, 1]
dim['xz' ] = [0, 2]
dim['yz' ] = [1, 2]
dim['x' ] = [0]
dim['y' ] = [1]
dim['z' ] = [2]
def user_material():
pass
class Material(object):
def save(self):
print(self._outdir)
"""save class as sel... | lgpl-3.0 |
CalebBell/thermo | tests/test_flash_pure.py | 1 | 95838 | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2019, Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal... | mit |
FCP-INDI/C-PAC | CPAC/timeseries/timeseries_analysis.py | 1 | 33297 | from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
from nipype.interfaces import fsl
from nipype.interfaces import afni
from nipype import logging
from nipype.interfaces.utility import Function
from CPAC.utils.datasource import create_roi_mask_dataflow, \
create_spati... | bsd-3-clause |
ryfeus/lambda-packs | Spacy/source2.7/numpy/core/tests/test_multiarray.py | 1 | 276524 | from __future__ import division, absolute_import, print_function
import collections
import tempfile
import sys
import shutil
import warnings
import operator
import io
import itertools
import functools
import ctypes
import os
import gc
from contextlib import contextmanager
if sys.version_info[0] >= 3:
import builti... | mit |
gfyoung/pandas | pandas/core/reshape/merge.py | 1 | 78334 | """
SQL-style merge routines
"""
from __future__ import annotations
import copy
import datetime
from functools import partial
import hashlib
import string
from typing import TYPE_CHECKING, Optional, Tuple, cast
import warnings
import numpy as np
from pandas._libs import Timedelta, hashtable as libhashtable, join as ... | bsd-3-clause |
bnaul/scikit-learn | sklearn/feature_extraction/text.py | 1 | 69610 | # -*- coding: utf-8 -*-
# Authors: Olivier Grisel <olivier.grisel@ensta.org>
# Mathieu Blondel <mathieu@mblondel.org>
# Lars Buitinck
# Robert Layton <robertlayton@gmail.com>
# Jochen Wersdörfer <jochen@wersdoerfer.de>
# Roman Sinayev <roman.sinayev@gmail.com>
#
# License: B... | bsd-3-clause |
nisse3000/pymatgen | pymatgen/io/abinit/tasks.py | 1 | 181653 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""This module provides functions and classes related to Task objects."""
from __future__ import division, print_function, unicode_literals, absolute_import
import os
import time
import datetime
import shutil
i... | mit |
immerrr/numpy | numpy/fft/fftpack.py | 2 | 41432 | """
Discrete Fourier Transforms
Routines in this module:
fft(a, n=None, axis=-1)
ifft(a, n=None, axis=-1)
rfft(a, n=None, axis=-1)
irfft(a, n=None, axis=-1)
hfft(a, n=None, axis=-1)
ihfft(a, n=None, axis=-1)
fftn(a, s=None, axes=None)
ifftn(a, s=None, axes=None)
rfftn(a, s=None, axes=None)
irfftn(a, s=None, axes=None... | bsd-3-clause |
Matrixeigs/Optimization | Two_stage_stochastic_optimization/distributed_optimization/opf_branch_power_flow_ADMM.py | 1 | 41266 | """
ADMM based distributed optimal power flow
The power flow modelling is based on the branch power flow
Notes:
1) The concept of observatory has been introduced and verified
2) Based on multi-block ADMM
3) Convergence verified
4) Simulation gap found! (related to the parameter of ru)
"""
from Two_stage_stochastic_op... | mit |
profLewis/ksolver | kernels.py | 1 | 38696 | import os
import numpy
from sys import exit
import numpy.ma as ma
'''
Author: Prof. P. Lewis, UCL
email: p.lewis@ucl.ac.uk
'''
class Kernels:
'''
Linear kernel models
'''
def __init__(self,vza,sza,raa,critical=1,RossHS=True,RecipFlag=True,HB=2.0,BR=1.0,MODISSPARSE=True,MODISDENSE=False,RossType='Thic... | mit |
jseabold/statsmodels | statsmodels/discrete/tests/test_discrete.py | 4 | 95582 | """
Tests for discrete models
Notes
-----
DECIMAL_3 is used because it seems that there is a loss of precision
in the Stata *.dta -> *.csv output, NOT the estimator for the Poisson
tests.
"""
# pylint: disable-msg=E1101
from statsmodels.compat.pandas import assert_index_equal
import os
import warnings
import numpy a... | bsd-3-clause |
plotly/plotly.py | packages/python/plotly/plotly/graph_objs/_treemap.py | 1 | 80895 | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Treemap(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "treemap"
_valid_props = {
"branchvalues",
"count",
"customdata",
"custo... | mit |
polyaxon/polyaxon | core/tests/test_streams/test_events_endpoints.py | 1 | 30353 | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | apache-2.0 |
TomAugspurger/pandas | pandas/tests/indexes/common.py | 1 | 32135 | import gc
from typing import Optional, Type
import numpy as np
import pytest
from pandas._libs import iNaT
from pandas.core.dtypes.common import is_datetime64tz_dtype
from pandas.core.dtypes.dtypes import CategoricalDtype
import pandas as pd
from pandas import (
CategoricalIndex,
DatetimeIndex,
Index,
... | bsd-3-clause |
Ziqi-Li/bknqgis | pandas/pandas/tests/test_categorical.py | 1 | 176501 | # -*- coding: utf-8 -*-
# pylint: disable=E1101,E1103,W0232
from warnings import catch_warnings
import pytest
import sys
from datetime import datetime
from distutils.version import LooseVersion
import numpy as np
from pandas.core.dtypes.dtypes import CategoricalDtype
from pandas.core.dtypes.common import (
is_ca... | gpl-2.0 |
protwis/protwis | tools/management/commands/build_structure_angles.py | 1 | 69350 | from django.core.management.base import BaseCommand
from django.db import connection
import contactnetwork.pdb as pdb
from structure.models import Structure, StructureVectors
from residue.models import Residue
from angles.models import ResidueAngle as Angle
from contactnetwork.models import Distance, distance_scaling_... | apache-2.0 |
eteq/pymodelfit | pymodelfit/builtins.py | 1 | 52317 | #Copyright 2008 Erik Tollerud
#
# 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 i... | apache-2.0 |
multicastTor/multicastTor | shadow/contrib/analyze.py | 1 | 127367 | #! /usr/bin/python
"""
analyze.py
Utility to help analyze results from the Shadow simulator. Use
'$ python analyze --help' to get started
"""
import matplotlib; matplotlib.use('Agg') # for systems without X11
import sys, os, argparse, subprocess, pylab, numpy, itertools, gzip, cPickle
## PARSING DEFAULTS
## defaul... | bsd-3-clause |
tkaitchuck/nupic | py/nupic/frameworks/prediction/postprocess/inputpredictionstats.py | 1 | 38969 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditions apply:
#
# This pro... | gpl-3.0 |
jmikko/fairnessML | experiments_no_sensitive.py | 1 | 41095 | from load_data import load_experiments
from sklearn import svm
import numpy as np
from measures import equalized_odds_measure_FP, equalized_odds_measure_from_pred_TP, equalized_odds_measure_TP_from_list_of_sensfeat
import matplotlib.pyplot as plt
from measures import equalized_odds_measure_TP_no_sensitive as equalized_... | gpl-3.0 |
gfyoung/pandas | pandas/tests/indexes/datetimes/test_timezones.py | 1 | 44931 | """
Tests for DatetimeIndex timezone-related methods
"""
from datetime import date, datetime, time, timedelta, tzinfo
import dateutil
from dateutil.tz import gettz, tzlocal
import numpy as np
import pytest
import pytz
from pandas._libs.tslibs import conversion, timezones
import pandas.util._test_decorators as td
imp... | bsd-3-clause |
kdebrab/pandas | pandas/tests/frame/test_indexing.py | 1 | 124170 | # -*- coding: utf-8 -*-
from __future__ import print_function
from warnings import catch_warnings
from datetime import datetime, date, timedelta, time
from pandas.compat import map, zip, range, lrange, lzip, long
from pandas import compat
from numpy import nan
from numpy.random import randn
import pytest
import nu... | bsd-3-clause |
herilalaina/scikit-learn | sklearn/metrics/tests/test_common.py | 10 | 43823 | from __future__ import division, print_function
from functools import partial
from itertools import product
import numpy as np
import scipy.sparse as sp
from sklearn.datasets import make_multilabel_classification
from sklearn.preprocessing import LabelBinarizer
from sklearn.utils.multiclass import type_of_target
fro... | bsd-3-clause |
adowaconan/Spindle_by_Graphical_Features | individual classification.py | 1 | 41638 | # -*- coding: utf-8 -*-
"""
Created on Mon May 29 11:14:44 2017
@author: ning
"""
import pandas as pd
import os
import numpy as np
from collections import Counter
from imblearn.combine import SMOTETomek
from sklearn.ensemble import RandomForestClassifier
from imblearn.over_sampling import SMOTE#,RandomOverSampler
fro... | mit |
chenhh/PySPPortfolio | PySPPortfolio/pysp_portfolio/test/test_min_cvar_eev.py | 1 | 33139 | # -*- coding: utf-8 -*-
"""
Authors: Hung-Hsin Chen <chenhh@par.cse.nsysu.edu.tw>
License: GPL v2
"""
from time import time
import numpy as np
import pandas as pd
from pyomo.environ import *
def min_cvar_ws_portfolio(symbols, risk_rois, risk_free_roi,
allocated_risk_wealth, allocated_risk_... | gpl-3.0 |
aquilesC/UUTrack | UUTrack/Controller/devices/hamamatsu/hamamatsu_camera.py | 1 | 34447 | # -*- coding: utf-8 -*-
"""
UUTrack.Controller.devices.hamamatsu.hamamatsu_camera.py
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
File taken from `ZhuangLab <https://github.com/ZhuangLab/storm-control>`_
A ctypes based interface to Hamamatsu cameras.
(tested on a sCMOS Flash 4.0).
... | mit |
stfl/gst-sctp | evaluation/evaluation.py | 1 | 56504 | import argparse
import numpy as np
# import numpy.lib.recfunctions as rcfuncs
import pandas as pd
import statistics as st
import shelve
from copy import deepcopy, copy
import sys
import os
import glob
import re
from operator import attrgetter
import pyshark
from IPython import embed
from IPython.core... | bsd-3-clause |
jcornford/pyecog | pyecog/visualisation/subwindows.py | 1 | 39597 | import sys
import os
import multiprocessing
import traceback
import numpy as np
import pandas as pd
from PyQt5 import QtGui, QtWidgets
from PyQt5.QtCore import QThread, pyqtSignal, Qt, QRect, QTimer
import pyqtgraph as pg
import h5py
import logging
import pickle
from sklearn.ensemble import RandomForestClassifier
from... | mit |
alexholcombe/twoWords | RansleySingleshotVersion/twoWordsAudioResponse_version for pilot3.py | 1 | 76574 | #Alex Holcombe alex.holcombe@sydney.edu.au
#See the github repository for more information: https://github.com/alexholcombe/twoWords
from __future__ import print_function, division
from psychopy import monitors, visual, event, data, logging, core, sound, gui, microphone
from matplotlib import pyplot
import psychop... | mit |
bdh1011/wau | venv/lib/python2.7/site-packages/pandas/core/strings.py | 1 | 47088 | import numpy as np
from pandas.compat import zip
from pandas.core.common import isnull, _values_from_object, is_bool_dtype, is_list_like
import pandas.compat as compat
from pandas.util.decorators import Appender, deprecate_kwarg
import re
import pandas.lib as lib
import warnings
import textwrap
_shared_docs = dict()... | mit |
Neurosim-lab/netpyne | netpyne/analysis/spikes.py | 1 | 87706 | """
Module for anaysis and plotting of spiking-related results
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
from __future__ import absolute_import
from builtins import dict
from builtins import round
from builtins import str
try:
basestring
exc... | mit |
EterniusVGM/Renju | Lab1-Rev/Lab1/Linear Regression and Gradient Descents.py | 1 | 72489 |
# coding: utf-8
# # Линейная Регрессия
# In[123]:
import numpy as np
import math
# In[124]:
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
# In[125]:
import pandas
# Теперь сделаем два облака точек, задав центры распределения:
# In[126]:
red_mean = np.array([1, 2])
blue_mean = np.ar... | mit |
Daniel-Brosnan-Blazquez/DIT-100 | lib/mag.py | 1 | 30126 | # -*- coding: utf-8 -*-
# Library for the Raspberry Pi that interfaces with LSM303DLHC
# magnetometer on Polulu boards
from smbus import SMBus
from common_i2c import *
import bitOps
import numpy
import time
import os
import signal
import accel
DEV_SLAVE_ADDR = 0x1e # Default device slave address
DEV_BUS_ID ... | gpl-3.0 |
ampron/nflstat | rank_NFL.py | 1 | 48173 | '''NFL Ranking Module
Author: Alex Pronschinske
'''
# built-in modules
import re
import random
from pprint import pprint
# third party modules
import numpy as np
from math import sqrt, exp, pi, log
from scipy.special import erf, erfinv, binom
from numpy.linalg import norm
# personal modules
try:
from NFL_cla... | gpl-3.0 |
MJuddBooth/pandas | pandas/tests/test_window.py | 1 | 157182 | from collections import OrderedDict
from datetime import datetime, timedelta
from itertools import product
import warnings
from warnings import catch_warnings
import numpy as np
from numpy.random import randn
import pytest
from pandas.compat import range, zip
from pandas.errors import UnsupportedFunctionCall
import p... | bsd-3-clause |
profxj/old_xastropy | xastropy/spec/voigt.py | 1 | 34185 | """
#;+
#; NAME:
#; voigt
#; Version 1.0
#;
#; PURPOSE:
#; Module for Voigt profiles
#; 01-Nov-2014 by JXP
#; ## Heavily adapted from Ryan Cooke (e.g. alis)
#;-
#;------------------------------------------------------------------------------
"""
from __future__ import print_function, absolute_import, divi... | bsd-3-clause |
ogrisel/scipy | scipy/stats/tests/test_morestats.py | 1 | 34937 | # Author: Travis Oliphant, 2002
#
# Further enhancements and tests added by numerous SciPy developers.
#
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
from numpy.random import RandomState
from numpy.testing import (TestCase, run_module_suite, assert_array_equal,
... | bsd-3-clause |
kdebrab/pandas | pandas/tests/indexes/test_numeric.py | 1 | 49381 | # -*- coding: utf-8 -*-
import pytest
from datetime import datetime
from pandas.compat import range, PY3
import numpy as np
from pandas import (date_range, Series, Index, Float64Index,
Int64Index, UInt64Index, RangeIndex)
import pandas.util.testing as tm
import pandas as pd
from pandas._libs.t... | bsd-3-clause |
wohllab/milkyway_proteomics | galaxy_milkyway_files/tools/wohl-proteomics/msgf2pin/milkyway_msgf2pin_converter.py | 1 | 68888 | ######################################
## MSGF2pin+SILAC Wapper, Wohlschlegel Lab
## Written by William Barshop
## For use in Galaxy-Proteomics Workflows
##
version="1.10"
##Date : 2019-09-03
##
######################################
from optparse import OptionParser
import subprocess
import copy
import pandas
import s... | mit |
caganze/splat | splat/evolve.py | 1 | 58082 | from __future__ import print_function, division
"""
.. note::
Using a suite of evolutionary models, this code translates
between the following brown dwarf parameters: mass, age,
temperature, radius, surface gravity, and luminosity. We allow
the user to choose a set of evolutionar... | mit |
runt18/nupic | external/linux32/lib/python2.6/site-packages/matplotlib/cbook.py | 1 | 42696 | """
A collection of utility functions and classes. Many (but not all)
from the Python Cookbook -- hence the name cbook
"""
from __future__ import generators
import re, os, errno, sys, StringIO, traceback, locale, threading, types
import time, datetime
import warnings
import numpy as np
import numpy.ma as ma
from weakr... | agpl-3.0 |
bradleyhd/netsim | sim_result.py | 1 | 581723 | import matplotlib.pyplot as plt
import numpy as np
import math
from scipy.optimize import curve_fit
import scipy.stats as stats
def linear(x, a, b):
return a * x + b
def exponential(x, a, b, c):
return a * x**2 + b * x + c
def exponential(x, a, b, c):
return a * x**b + c
fig = plt.figure(num=None, figsize=(12... | gpl-3.0 |
RebeccaMerrett/Papyrus--simple-but-effective-text-summarization-tool | papyrus_summary_extraction_tool.py | 1 | 565205 | # -*- coding: utf-8 -*-
#A SIMPLE (BUT EFFECTIVE) SUMMARIZATION TOOL FOR GOVERNMENT TRANSCRIPTS
#Below is a demonstration of summary extraction tool Papyrus, which is used on a large corpus taken from a government transcript.
#This was built during a 46-hour hackathon (GovHack), so it's a quick solution, but eff... | mpl-2.0 |
billbrod/spatial-frequency-preferences | sfp/plotting.py | 1 | 90228 | #!/usr/bin/python
"""high-level functions to make relevant plots
"""
import matplotlib as mpl
# we do this because sometimes we run this without an X-server, and this backend doesn't need
# one. We set warn=False because the notebook uses a different backend and will spout out a big
# warning to that effect; that's unn... | mit |
MacHu-GWU/sqlite4dummy-project | sqlite4dummy/engine.py | 1 | 36070 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
English Doc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:class:`Sqlite3Engine` is the top class you are doing CRUD with. You could define
the Engine by giving the database file path (for memory database, use
``":memory:"``).
And th... | mit |
uranc/locmea | src/locOptimizationProblem.py | 1 | 60967 | """
@author Cem Uran <cemuran@gmail.com>
Copyright (C) This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your option)
any later version. This program is distribu... | gpl-3.0 |
sauloal/introgressionbrowser | vcfmerger/old/vcf_walk_old.py | 1 | 48820 | #!/usr/bin/python
import os, sys
import cPickle
import argparse
import copy
import glob
import array
import gzip
import zlib
import base64
from subprocess import call
import multiprocessing
from multiprocessing import Pool, Queue
HAS_IMG = True
try:
import numpy as NP
from matplotlib import pyplot as PLT
... | mit |
anomam/pvlib-python | pvlib/clearsky.py | 1 | 32771 | """
The ``clearsky`` module contains several methods
to calculate clear sky GHI, DNI, and DHI.
"""
import os
from collections import OrderedDict
import calendar
import numpy as np
import pandas as pd
from pvlib import atmosphere, tools
def ineichen(apparent_zenith, airmass_absolute, linke_turbidity,
a... | bsd-3-clause |
eickenberg/scikit-learn | sklearn/linear_model/least_angle.py | 1 | 46630 | """
Least Angle Regression algorithm. See the documentation on the
Generalized Linear Model for a complete discussion.
"""
from __future__ import print_function
# Author: Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Gael Varoquaux
#
# License: BSD 3 ... | bsd-3-clause |
dingmingliu/quanttrade | tests/test_core.py | 1 | 39315 | import copy
import bt
from bt.core import Node, StrategyBase, SecurityBase, AlgoStack, Strategy
import pandas as pd
from nose.tools import assert_almost_equal as aae
import mock
def test_node_tree():
c1 = Node('c1')
c2 = Node('c2')
p = Node('p', children=[c1, c2])
c1 = p['c1']
c2 = p['c2']
... | apache-2.0 |
dch312/scipy | scipy/signal/signaltools.py | 1 | 81613 | # Author: Travis Oliphant
# 1999 -- 2002
from __future__ import division, print_function, absolute_import
import warnings
import threading
from . import sigtools
from scipy._lib.six import callable
from scipy._lib._version import NumpyVersion
from scipy import linalg
from scipy.fftpack import (fft, ifft, ifftshift, ... | bsd-3-clause |
jay-johnson/sci-pype | src/common/load_redten_ipython_env.py | 1 | 50930 | ################################################################
#
# ENV variables in use:
#
# ENV_CORE_CONFIG_FILE - the core configuration file to use
# ENV_RDS_ENABLED - are the redis applications enabled
# ENV_DBS_ENABLED - are the database applications enabled
# ENV_DATA_SRC_DIR - where is the data dir
# ENV_DEPLO... | apache-2.0 |
hajicj/safire | safire/utils/transformers.py | 1 | 44758 | # !/usr/bin/env python
"""
``transformers.py`` is a library that contains various non-NNET SAFIRE
transformer components, mainly used for miscellaneous preprocessing (scaling,
normalization, sigmoid nonlinearity, etc.).
"""
import collections
import itertools
import logging
import operator
import copy
import gensim
fr... | gpl-3.0 |
amolkahat/pandas | pandas/tests/frame/test_operators.py | 1 | 37289 | # -*- coding: utf-8 -*-
from __future__ import print_function
from collections import deque
from datetime import datetime
from decimal import Decimal
import operator
import pytest
from numpy import nan
import numpy as np
from pandas.compat import range
from pandas import compat
from pandas import (DataFrame, Series... | bsd-3-clause |
pydata/xarray | xarray/tests/test_units.py | 1 | 182483 | import functools
import operator
import numpy as np
import pandas as pd
import pytest
import xarray as xr
from xarray.core import dtypes, duck_array_ops
from . import assert_allclose, assert_duckarray_allclose, assert_equal, assert_identical
from .test_variable import _PAD_XR_NP_ARGS
pint = pytest.importorskip("pin... | apache-2.0 |
l8orre/nxtBridge | nxtPwt/nxtModels.py | 1 | 104847 |
from PyQt4.QtCore import QObject ,QAbstractTableModel, pyqtSignal, pyqtSlot, SIGNAL, QModelIndex , Qt
from PyQt4.Qt import *
from PyQt4.QtGui import QColor, QPixmap, QIcon
import time
from PyQt4.QtCore import QObject , pyqtSignal, pyqtSlot, SIGNAL
from copy import copy
import numpy as np
from nxtPwt.nxtApiProto... | mit |
sauloal/cnidaria | scripts/venv/lib/python2.7/site-packages/pandas/io/sql.py | 1 | 60838 | # -*- 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 |
cebel/pyuniprot | src/pyuniprot/manager/query.py | 1 | 39273 | # -*- coding: utf-8 -*-
from .database import BaseDbManager
from . import models
from sqlalchemy import distinct
from pandas import read_sql
from collections import Iterable
class QueryManager(BaseDbManager):
"""Query interface to database."""
def _limit_and_df(self, query, limit, as_df=False):
"""a... | apache-2.0 |
bjlittle/iris | lib/iris/tests/test_plot.py | 1 | 31911 | # Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
# import iris tests first so that some things can be initialised before
# importing anything else
import iris.tests as tests ... | lgpl-3.0 |
cxxgtxy/tensorflow | tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined_test.py | 1 | 69559 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
srio/Orange-XOPPY | orangecontrib/xoppy/widgets/optics/srcalc_idpower.py | 1 | 83132 | import sys, os, platform
import numpy
from PyQt5.QtWidgets import QApplication, QSizePolicy
from PyQt5 import QtGui, QtWidgets
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui, congruence
from orangecontrib.xoppy.widgets.gui.ow_xoppy_widget import Xoppy... | bsd-2-clause |
AndrewAnnex/SpiceyPy | spiceypy/tests/test_wrapper.py | 1 | 312302 | """
The MIT License (MIT)
Copyright (c) [2015-2021] [Andrew Annex]
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 rights
to use, copy, modif... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.