repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
GitYiheng/reinforcement_learning_test | test06_deep_reinforcement_learning/test12_env.py | 1 | 38280 | from __future__ import print_function, division
import gym
import numpy as np
from gym import error, spaces, utils
from gym.utils import seeding
from numpy import array, linspace, deg2rad, zeros
from sympy import symbols
from sympy.physics.mechanics import dynamicsymbols, ReferenceFrame, Point, inertia, RigidBody, Ka... | mit |
xray/xray | xarray/tests/test_backends.py | 1 | 181259 | import contextlib
import itertools
import math
import os.path
import pickle
import shutil
import sys
import tempfile
import warnings
from contextlib import ExitStack
from io import BytesIO
from pathlib import Path
from typing import Optional
import numpy as np
import pandas as pd
import pytest
from pandas.errors impor... | apache-2.0 |
linebp/pandas | pandas/tests/dtypes/test_inference.py | 1 | 35947 | # -*- coding: utf-8 -*-
"""
These the test the public routines exposed in types/common.py
related to inference and not otherwise tested in types/test_common.py
"""
from warnings import catch_warnings
import collections
import re
from datetime import datetime, date, timedelta, time
from decimal import Decimal
import n... | bsd-3-clause |
yuxiaobu/nansat | figure.py | 1 | 34250 | # Name: figure.py
# Purpose: Container of Figure class
# Authors: Asuka Yamakawa, Anton Korosov, Knut-Frode Dagestad,
# Morten W. Hansen, Alexander Myasoyedov,
# Dmitry Petrenko, Evgeny Morozov
# Created: 29.06.2011
# Copyright: (c) NERSC 2011 - 2013
# Licence:
# This... | gpl-3.0 |
sniemi/SamPy | sandbox/testing/sphinx_test/STISCCDSpectroscopyFlat.py | 1 | 58685 | #! /usr/bin/env python
'''
ABOUT:
Creates STIS Spectroscopic pixel-to-pixel flat fields from RAW data.
Uses spline fits after dust motes, bad pixels, etc. have been masked
to fit and to remove the low frequency structure. The data are divided
by each fit to normalize the data before it is combined and co-added with
app... | bsd-2-clause |
Kate-Willett/HadISDH_Marine_Build | EUSTACE_SST_MAT/PlotMetaData_APR2016.py | 1 | 47963 | #!/usr/local/sci/bin/python
# PYTHON2.7
#
# Author: Kate Willett
# Created: 1 April 2016
# Last update: 1 April 2016
# Location: /data/local/hadkw/HADCRUH2/MARINE/EUSTACEMDS/EUSTACE_SST_MAT/
# GitHub: https://github.com/Kate-Willett/HadISDH_Marine_Build/
# -----------------------
# CODE PURPOSE AND OUTPUT
# -----... | cc0-1.0 |
quantumjot/PyFolding | pyfolding/ising.py | 1 | 33738 | #!/usr/bin/env python
"""
Python implementation of common model fitting operations to
analyse protein folding data. Simply automates some fitting
and value calculation. Will be extended to include phi-value
analysis and other common calculations.
Allows for quick model evaluation and plotting.
Also tried to make thi... | mit |
chrishokamp/dl4mt-material | session1/nmt.py | 2 | 35902 | '''
Build a simple neural machine translation model
'''
import theano
import theano.tensor as tensor
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
import cPickle as pkl
import numpy
import copy
import os
import warnings
import sys
import time
from scipy import optimize, stats
from collections... | bsd-3-clause |
RomainBrault/scikit-learn | sklearn/model_selection/_split.py | 3 | 71774 | """
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>
# Ragha... | bsd-3-clause |
zingale/pyreaclib | reaclib.py | 1 | 43236 | # parse the reaclib stuff
from __future__ import print_function
import glob
import os
import shutil
import re
import networkx as nx
import numpy as np
import matplotlib.pyplot as plt
from periodictable import elements
class Nucleus(object):
"""
a nucleus that participates in a reaction -- we store it in a... | bsd-3-clause |
nilqed/fricas_kernel | fricas_kernel.py | 2 | 36720 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
__author__ = "Kurt Pagani <nilqed@gmail.com>"
__svn_id__ = "$Id: theKernel.py 3 2015-08-18 03:28:01Z pagani $"
from IPython.kernel.zmq.kernelbase import Kernel
import re, os, tempfile
if os.name == 'nt':
import winpexpect as xp
spawn = xp.winspawn
else:
imp... | bsd-2-clause |
liam2/larray | larray/core/session.py | 2 | 54733 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import os
import sys
import re
import fnmatch
import warnings
from collections import OrderedDict
import numpy as np
from larray.core.metadata import Metadata
from larray.core.group import Group
from larray.core.axis import Axis... | gpl-3.0 |
dialounke/pylayers | pylayers/gis/ezone.py | 1 | 45980 | # -*- coding: utf-8 -*-
"""
.. currentmodule:: pylayers.gis.ezone*
.. autosummary::
"""
import h5py
import numpy as np
import pandas as pd
import zipfile
import pickle
import os
import pdb
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.tri as tri
from osgeo import gdal
# from imposm.par... | mit |
ryandougherty/mwa-capstone | MWA_Tools/build/matplotlib/lib/matplotlib/colorbar.py | 3 | 34547 | '''
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-2.0 |
jakevdp/seaborn | seaborn/palettes.py | 1 | 34828 | from __future__ import division
import colorsys
from itertools import cycle
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
from .external import husl
from .external.six import string_types
from .external.six.moves import range
from .u... | bsd-3-clause |
mohseniaref/PySAR-1 | pysar/multi_transect.py | 1 | 33513 | #! /usr/bin/env python
############################################################
# Program is part of PySAR v1.0 #
# Copyright(c) 2013, Heresh Fattahi #
# Author: Heresh Fattahi #
#####################################################... | mit |
brclark-usgs/flopy | flopy/utils/util_array.py | 1 | 104776 | """
util_array module. Contains the util_2d, util_3d and transient_2d classes.
These classes encapsulate modflow-style array inputs away
from the individual packages. The end-user should not need to
instantiate these classes directly.
"""
from __future__ import division, print_function
# from future.utils... | bsd-3-clause |
rfinn/LCS | paper1code/LCSmaketileplot.py | 1 | 49030 | #!/usr/bin/env python
'''
GOAL:
- make a figure showing color, r, and 24 cutout for truncated galaxies
- repeat for non-truncated galaxies
USAGE:
In [12]: %run ~/svnRepository/pythonCode/LCSmaketileplot.py
In [13]: s.plotcolorsort()
# to plot all galaxies ordered by NSAID
s.plotcolor_all(plotellipse=0, showall=F... | gpl-3.0 |
ryandougherty/mwa-capstone | MWA_Tools/build/matplotlib/lib/matplotlib/axis.py | 1 | 72225 | """
Classes for the ticks and x and y axis
"""
from __future__ import division
from matplotlib import rcParams
import matplotlib.artist as artist
from matplotlib.artist import allow_rasterization
import matplotlib.cbook as cbook
import matplotlib.font_manager as font_manager
import matplotlib.lines as mlines
import m... | gpl-2.0 |
zedyang/vn.past-demo | api.py | 2 | 45126 | #encoding: UTF-8
import os
import json
import time
import requests
import pymongo
import sqlalchemy
import pandas as pd
from datetime import datetime, timedelta
from Queue import Queue, Empty
from threading import Thread, Timer
from pymongo import MongoClient
from sqlalchemy import create_engine
from requests.excepti... | mit |
bdh1011/wau | venv/lib/python2.7/site-packages/pandas/tests/test_graphics.py | 1 | 159589 | #!/usr/bin/env python
# coding: utf-8
import nose
import itertools
import os
import string
import warnings
from distutils.version import LooseVersion
from datetime import datetime, date
from pandas import (Series, DataFrame, MultiIndex, PeriodIndex, date_range,
bdate_range)
from pandas.compat imp... | mit |
4shadoww/usploit | core/lib/scapy/layers/inet.py | 2 | 131909 | ## 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,types
from select import select
from collections im... | mit |
musevlt/zap | zap/zap.py | 1 | 43070 | # ZAP - Zurich Atmosphere Purge
#
# Copyright (c) 2014-2016 Kurt Soto
# Copyright (c) 2015-2019 Simon Conseil
#
# 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
... | mit |
mperignon/component_creator | topoflow_creator/topoflow/infil_richards_1D.py | 1 | 101256 |
## Copyright (c) 2001-2013, Scott D. Peckham
##
## January 2013 (Revised handling of input/output names).
## October 2012 (CSDMS Standard Names and BMI)
## January 2009 (converted from IDL)
## May, August 2009
## May 2010 (changes to unit_test() and read_cfg_file()
## June 2010 (Bug fix: Added qH_val and eta_val... | gpl-2.0 |
dallascard/guac | core/rnn/bilstm_tri_objective_hierarchical.py | 1 | 36628 | from optparse import OptionParser
import os
import sys
import json
import codecs
import gensim
import random
from collections import OrderedDict
from collections import Counter
from collections import defaultdict
import numpy as np
import theano
from theano import tensor as T
from theano.tensor.shared_randomstreams ... | apache-2.0 |
dsm054/pandas | pandas/core/indexes/multi.py | 1 | 104947 |
# pylint: disable=E1101,E1103,W0232
import datetime
import warnings
from sys import getsizeof
import numpy as np
from pandas._libs import algos as libalgos, index as libindex, lib, Timestamp
from pandas._libs import tslibs
from pandas.compat import range, zip, lrange, lzip, map
from pandas.compat.numpy import functi... | bsd-3-clause |
lidavidm/mathics-heroku | venv/lib/python2.7/site-packages/sympy/utilities/runtests.py | 1 | 75400 | """
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... | gpl-3.0 |
ston380/xlwings | xlwings/tests/test_xlwings.py | 1 | 32269 | # -*- coding: utf-8 -*-
# To run a single TestClass: nosetests -q -s test_xlwings:TestRange
# To run a single Test: nosetests -q -s test_xlwings:TestRange.test_
from __future__ import unicode_literals
import os
import sys
import shutil
import nose
from nose.tools import assert_equal, raises, assert_true, assert_false
... | apache-2.0 |
vascotenner/holoviews | holoviews/plotting/plot.py | 1 | 37670 | """
Public API for all plots supported by HoloViews, regardless of
plotting package or backend. Every plotting classes must be a subclass
of this Plot baseclass.
"""
from itertools import groupby, product
from collections import Counter, defaultdict
import numpy as np
import param
from ..core import OrderedDict
from... | bsd-3-clause |
cbertinato/pandas | pandas/tests/frame/test_query_eval.py | 1 | 42008 | from io import StringIO
import operator
import numpy as np
import pytest
import pandas.util._test_decorators as td
import pandas as pd
from pandas import DataFrame, Index, MultiIndex, Series, date_range
from pandas.core.computation.check import _NUMEXPR_INSTALLED
from pandas.tests.frame.common import TestData
from p... | bsd-3-clause |
donkirkby/domiculture | domino_puzzle.py | 2 | 51590 | import math
import re
import typing
from operator import itemgetter
from collections import defaultdict, deque
from concurrent.futures import Future
from concurrent.futures.process import ProcessPoolExecutor
from dataclasses import dataclass
from datetime import datetime, timedelta
from functools import partial
from it... | mit |
plotly/plotly.py | packages/python/plotly/plotly/graph_objs/_scatter3d.py | 1 | 102193 | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Scatter3d(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "scatter3d"
_valid_props = {
"connectgaps",
"customdata",
"customdatasrc",
... | mit |
bmcage/stickproject | stick/yarn2d/fiber_layout.py | 1 | 54482 | #
# Copyright (C) 2010 B. Malengier
# Copyright (C) 2010 P.Li
#
# 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 2 of the License, or
# (at your option) any later version.
#
# Th... | gpl-2.0 |
chrsrds/scikit-learn | sklearn/linear_model/stochastic_gradient.py | 2 | 63385 | # Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author)
# Mathieu Blondel (partial_fit support)
#
# License: BSD 3 clause
"""Classification and regression using Stochastic Gradient Descent (SGD)."""
import numpy as np
import warnings
from abc import ABCMeta, abstractmethod
from joblib imp... | bsd-3-clause |
mikedh/trimesh | trimesh/path/path.py | 1 | 46132 | """
path.py
-----------
A module designed to work with vector paths such as
those stored in a DXF or SVG file.
"""
import numpy as np
import copy
import hashlib
import collections
from ..points import plane_fit
from ..geometry import plane_transform
from ..visual import to_rgba
from ..constants import log
from ..con... | mit |
BryanCutler/spark | python/pyspark/pandas/namespace.py | 1 | 100525 | #
# 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 |
nmayorov/scipy | scipy/stats/tests/test_morestats.py | 2 | 81584 | # Author: Travis Oliphant, 2002
#
# Further enhancements and tests added by numerous SciPy developers.
#
import warnings
import numpy as np
from numpy.random import RandomState
from numpy.testing import (assert_array_equal,
assert_almost_equal, assert_array_less, assert_array_almost_equal,
assert_, assert_all... | bsd-3-clause |
ronanki/merlin | src/run_merlin.py | 1 | 55848 |
import cPickle
import gzip
import os, sys, errno
import time
import math
import subprocess
import socket # only for socket.getfqdn()
# numpy & theano imports need to be done in this order (only for some numpy installations, not sure why)
import numpy
#import gnumpy as gnp
# we need to explicitly import this in some... | apache-2.0 |
timothydmorton/isochrones | isochrones/starmodel.py | 1 | 72496 | from __future__ import print_function, division
import os, os.path, sys, re, glob
import itertools
from copy import deepcopy
import json
from .config import on_rtd
from .logger import getLogger
logger = getLogger()
if not on_rtd:
import numpy as np
import pandas as pd
import numpy.random as rand
f... | mit |
pizzathief/scipy | scipy/signal/ltisys.py | 1 | 128096 | """
ltisys -- a collection of classes and functions for modeling linear
time invariant systems.
"""
#
# Author: Travis Oliphant 2001
#
# Feb 2010: Warren Weckesser
# Rewrote lsim2 and added impulse2.
# Apr 2011: Jeffrey Armstrong <jeff@approximatrix.com>
# Added dlsim, dstep, dimpulse, cont2discrete
# Aug 2013: Jua... | bsd-3-clause |
winklerand/pandas | pandas/core/indexes/multi.py | 1 | 100793 |
# pylint: disable=E1101,E1103,W0232
import datetime
import warnings
from sys import getsizeof
import numpy as np
from pandas._libs import index as libindex, lib, Timestamp
from pandas.compat import range, zip, lrange, lzip, map
from pandas.compat.numpy import function as nv
from pandas import compat
from pandas.cor... | bsd-3-clause |
gfyoung/pandas | pandas/tests/apply/test_frame_apply.py | 1 | 56802 | from datetime import datetime
from itertools import chain
import warnings
import numpy as np
import pytest
from pandas.core.dtypes.dtypes import CategoricalDtype
import pandas as pd
from pandas import DataFrame, MultiIndex, Series, Timestamp, date_range, notna
import pandas._testing as tm
from pandas.core.base impor... | bsd-3-clause |
qusp/orange3 | Orange/widgets/visualize/owparallelgraph.py | 1 | 35011 | #
# OWParallelGraph.py
#
from collections import defaultdict
import os
import sys
import math
import numpy as np
from PyQt4.QtCore import QLineF, Qt, QEvent, QRect, QPoint, QPointF
from PyQt4.QtGui import QGraphicsPathItem, QPixmap, QColor, QBrush, QPen, QToolTip, QPainterPath, QPolygonF, QGraphicsPolygonItem
from O... | bsd-2-clause |
pylayers/pylayers | pylayers/gis/ezone.py | 1 | 44785 | # -*- coding: utf-8 -*-
"""
.. currentmodule:: pylayers.gis.ezone*
.. autosummary::
"""
import h5py
import numpy as np
import pandas as pd
import zipfile
import pickle
import os
import pdb
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.tri as tri
#from osgeo import gdal
# from imposm.pa... | mit |
bbfrederick/rapidtide | rapidtide/workflows/rapidtide.py | 1 | 121658 | #!/usr/bin/env python
# -*- coding: latin-1 -*-
#
# Copyright 2016-2021 Blaise Frederick
#
# 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/LICEN... | apache-2.0 |
dsm054/pandas | pandas/tests/dtypes/test_inference.py | 1 | 46836 | # -*- coding: utf-8 -*-
"""
These the test the public routines exposed in types/common.py
related to inference and not otherwise tested in types/test_common.py
"""
from warnings import catch_warnings, simplefilter
import collections
import re
from datetime import datetime, date, timedelta, time
from decimal import De... | bsd-3-clause |
dwillmer/blaze | blaze/compute/tests/test_sql_compute.py | 1 | 50526 | from __future__ import absolute_import, division, print_function
import pytest
sa = pytest.importorskip('sqlalchemy')
import itertools
import re
from distutils.version import LooseVersion
import datashape
from odo import into, resource
from pandas import DataFrame
from toolz import unique
from blaze.compute.sql i... | bsd-3-clause |
amolkahat/pandas | pandas/io/pytables.py | 1 | 165907 | # pylint: disable-msg=E1101,W0613,W0603
"""
High level interface to PyTables for reading and writing pandas data structures
to disk
"""
import copy
import itertools
import os
import re
import time
import warnings
from datetime import date, datetime
from distutils.version import LooseVersion
import numpy as np
import... | bsd-3-clause |
kdebrab/pandas | pandas/tests/series/test_analytics.py | 1 | 79582 | # coding=utf-8
# pylint: disable-msg=E1101,W0612
from itertools import product
from distutils.version import LooseVersion
import operator
import pytest
from numpy import nan
import numpy as np
import pandas as pd
from pandas import (Series, Categorical, DataFrame, isna, notna,
bdate_range, date_r... | bsd-3-clause |
pelson/conda-build | tests/test_api_build.py | 2 | 62212 | """
This module tests the build API. These are high-level integration tests.
"""
import base64
import locale
from collections import OrderedDict
from glob import glob
import logging
import os
import re
import subprocess
import sys
import json
import uuid
# for version
import conda
from conda_build.conda_interface i... | bsd-3-clause |
brentp/clustermodel | clustermodel/pyper.py | 1 | 34094 | #!/usr/bin/env python
'''
PypeR (PYthon-piPE-R)
This package provides a light-weight interface to use R in Python by pipe. It
can be used on multiple platforms since it is written in pure python.
Prerequisites:
1. Python 2.3 or later is required.
Usage:
The usage of this packages is very simple. E... | bsd-3-clause |
nigroup/pypet | pypet/brian/parameter.py | 1 | 31450 | """Module containing results and parameters that can be used to store `BRIAN data`_.
Parameters handling BRIAN data are instantiated by the
:class:`~pypet.brian.parameter.BrianParameter` class for any BRIAN Quantity.
The :class:`~pypet.brian.parameter.BrianResult` can store BRIAN Quantities
and the :class:`~pypet.bri... | bsd-3-clause |
imito/odin | odin/ml/gmm_tmat.py | 1 | 77006 | # -*- coding: utf-8 -*-
""""
This module contains tools for Gaussian mixture modeling (GMM)
__author__ = 'Omid Sadjadi, Timothee Kheyrkhah'
__email__ = 'omid.sadjadi@nist.gov'
Modification and GPU-implementation by TrungNT
"""
import os
import pickle
import random
import threading
import time
from collections import Ma... | mit |
tum-ens/rivus | rivus/io/db.py | 2 | 35927 | import warnings
from datetime import datetime
from pandas import Series, DataFrame, read_sql
from geopandas import GeoDataFrame
from shapely.wkt import loads as wkt_load
import json
from ..main.rivus import get_timeseries, get_constants
def init_run(engine, runner='Havasi', start_ts=None, status='prepared',
... | gpl-3.0 |
plotly/plotly.py | packages/python/plotly/plotly/graph_objs/_table.py | 1 | 39668 | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Table(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "table"
_valid_props = {
"cells",
"columnorder",
"columnordersrc",
"column... | mit |
jseabold/statsmodels | statsmodels/stats/proportion.py | 2 | 78179 | # -*- coding: utf-8 -*-
"""Tests and Confidence Intervals for Binomial Proportions
Created on Fri Mar 01 00:23:07 2013
Author: Josef Perktold
License: BSD-3
"""
from statsmodels.compat.python import lzip
import numpy as np
from scipy import stats, optimize
from sys import float_info
from statsmodels.stats.base impo... | bsd-3-clause |
cython-testbed/pandas | pandas/core/ops.py | 1 | 68528 | """
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 lib, algos as libalgos, ops as libops
... | bsd-3-clause |
plotly/python-api | packages/python/plotly/plotly/graph_objs/heatmapgl/_colorbar.py | 1 | 69460 | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class ColorBar(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "heatmapgl"
_path_str = "heatmapgl.colorbar"
_valid_props = {
"bgcolor",
"b... | mit |
david-zwicker/cv-mouse-burrows | mouse_burrows/algorithm/analyzer.py | 1 | 51060 | '''
Created on Sep 11, 2014
@author: David Zwicker <dzwicker@seas.harvard.edu>
Contains a class that can be used to analyze results from the tracking
'''
from __future__ import division
import collections
import copy
import itertools
import numpy as np
import networkx as nx
from scipy import ndimage
from shapely i... | bsd-3-clause |
CalebBell/thermo | thermo/utils/mixture_property.py | 1 | 33763 | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2016, 2017, 2018, 2019, 2020 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 (t... | mit |
chemelnucfin/tensorflow | tensorflow/contrib/metrics/python/ops/metric_ops.py | 1 | 178840 | # 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 |
silasb/flatcam | FlatCAMObj.py | 1 | 36234 | from PyQt4 import QtCore
from ObjectUI import *
import FlatCAMApp
import inspect # TODO: For debugging only.
from camlib import *
from FlatCAMCommon import LoudDict
########################################
## FlatCAMObj ##
########################################
class FlatCAMObj(QtCore.QObje... | mit |
DailyActie/Surrogate-Model | 01-codes/scikit-learn-master/sklearn/decomposition/dict_learning.py | 1 | 46143 | """ Dictionary learning
"""
from __future__ import print_function
# Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort
# License: BSD 3 clause
import time
import sys
import itertools
from math import sqrt, ceil
import numpy as np
from scipy import linalg
from numpy.lib.stride_tricks import as_strided
from ..b... | mit |
PmagPy/PmagPy | programs/demag_gui.py | 1 | 402031 | #!/usr/bin/env pythonw
"""
Runs Demag GUI PmagPy's main analysis GUI for demagnetization data. This
can be used for PCA of both AF and Thermal demag data, and calculation
of VGP's. It allows export of figures and analysis results for upload to
the MagIC database and/or publication. For more information on how to interp... | bsd-3-clause |
mrshu/scikit-learn | sklearn/linear_model/coordinate_descent.py | 1 | 44980 | # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Olivier Grisel <olivier.grisel@ensta.org>
# Gael Varoquaux <gael.varoquaux@inria.fr>
#
# License: BSD Style.
import sys
import warnings
import itertools
import operator
from abc import AB... | bsd-3-clause |
AntonSax/plantcv | utils/db-exporter-pcv2.py | 1 | 35884 | #!/usr/bin/env python
import argparse
import os
import sqlite3 as sq
import pandas as pd
import numpy as np
import time
### Parse command-line arguments
def options():
parser = argparse.ArgumentParser(description="Extract VIS object shape data from an SQLite database")
parser.add_argument("-d", "--database", help... | mit |
google/meterstick | metrics.py | 1 | 63256 | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 |
kubeflow/kfp-tekton | samples/titanic-ml-dataset/titanic-ml.py | 1 | 40561 | import json
import kfp.dsl as _kfp_dsl
import kfp.components as _kfp_components
from collections import OrderedDict
from kubernetes import client as k8s_client
def loaddata():
from kale.common import mlmdutils as _kale_mlmdutils
_kale_mlmdutils.init_metadata()
_kale_block1 = '''
import numpy as np
... | apache-2.0 |
soar-telescope/goodman | goodman_pipeline/core/core.py | 1 | 177808 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import calendar
import ccdproc
import collections
import datetime
import glob
import logging
import math
import numpy as np
import os
import pandas
import random
import re
import scipy
import subprocess
import ... | bsd-3-clause |
philipp-germann/lana | lana/contacts.py | 1 | 39283 | """Analyze and plot contacts within lymph nodes"""
import itertools
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import scipy.spatial as spatial
import mpl_toolkits.mplot3d.axes3d as p3
import mpl_toolkits.mplot3d.art3d as art3d
import matplotlib.gridspec as gridspec
fro... | gpl-2.0 |
TomAugspurger/pandas | pandas/core/generic.py | 1 | 382882 | import collections
from datetime import timedelta
import functools
import gc
import json
import operator
import pickle
import re
from textwrap import dedent
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
FrozenSet,
Hashable,
List,
Mapping,
Optional,
Sequence,
Set,
... | bsd-3-clause |
schets/scikit-learn | sklearn/preprocessing/tests/test_data.py | 1 | 33432 | import warnings
import numpy as np
import numpy.linalg as la
from scipy import sparse
from distutils.version import LooseVersion
from sklearn.utils.testing import assert_almost_equal, clean_warning_registry
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_array_equal... | bsd-3-clause |
dipapaspyros/bdo_platform | visualizer/views.py | 1 | 167212 | from __future__ import unicode_literals, division
# -*- coding: utf-8 -*-
import prestodb
from django.conf import settings
from django.http.response import HttpResponseNotFound
from django.shortcuts import render, redirect
from django.db import connection, connections
from rest_framework.views import APIView
from forms... | mit |
tdda/tdda | tdda/rexpy/rexpy.py | 1 | 69753 | # -*- coding: utf-8 -*-
"""
Usage::
rexpy [FLAGS] [input file [output file]]
If input file is provided, it should contain one string per line;
otherwise lines will be read from standard input.
If output file is provided, regular expressions found will be written
to that (one per line); otherwise they will be pr... | mit |
architecture-building-systems/CEAforArcGIS | cea/inputlocator.py | 1 | 54029 | """
inputlocator.py - locate input files by name based on the reference folder structure.
"""
import os
import cea.schemas
import shutil
import tempfile
import time
__author__ = "Daren Thomas"
__copyright__ = "Copyright 2017, Architecture and Building Systems - ETH Zurich"
__credits__ = ["Daren Thomas", "Jimeno A.... | mit |
iandriver/SCICAST | scicast/dim_reduction.py | 1 | 31212 | import numpy as np
import pandas as pd
import os
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA as skPCA
import seaborn as sns
import matplotlib.patches as patches
from sklearn.manifold import TSNE
from sklearn.decomposition import TruncatedSVD
from sklea... | mit |
laurentgo/arrow | python/pyarrow/tests/test_convert_builtin.py | 1 | 45147 | # 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 |
mulhod/reviewer_experience_prediction | util/cv_learn.py | 1 | 61443 | """
:author: Matt Mulholland (mulhodm@gmail.com)
:date: 10/14/2015
Command-line utility utilizing the RunCVExperiments class, which enables
one to run cross-validation experiments incrementally with a number of
different machine learning algorithms and parameter customizations, etc.
"""
import logging
from copy import... | mit |
perryjohnson/biplaneblade | biplane_blade_lib/prep_stn24_mesh.py | 1 | 30962 | """Write initial TrueGrid files for one biplane blade station.
Usage
-----
start an IPython (qt)console with the pylab flag:
$ ipython qtconsole --pylab
or
$ ipython --pylab
Then, from the prompt, run this script:
|> %run biplane_blade_lib/prep_stnXX_mesh.py
or
|> import biplane_blade_lib/prep_stnXX_mesh
... | gpl-3.0 |
kirichoi/tellurium | tellurium/tellurium.py | 1 | 33523 | """
Main tellurium entry point.
The module tellurium provides support routines.
As part of this module an ExendedRoadRunner class is defined which provides helper methods for
model export, plotting or the Jarnac compatibility layer.
"""
##############################################
# Core imports
###################... | apache-2.0 |
joegomes/deepchem | deepchem/data/datasets.py | 1 | 32915 | """
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 functools import partial
from deepchem.utils.save import save_to_disk
from deepchem.utils.save im... | mit |
great-expectations/great_expectations | tests/datasource/data_connector/test_configured_asset_s3_data_connector.py | 1 | 36859 | import json
from typing import List
from unittest import mock
import boto3
import pandas as pd
import pytest
from moto import mock_s3
from ruamel.yaml import YAML
import great_expectations.exceptions.exceptions as ge_exceptions
from great_expectations import DataContext
from great_expectations.core.batch import (
... | apache-2.0 |
whitergh/brainx | brainx/modularity.py | 1 | 55080 | # encoding: utf-8
"""Detect modules in a network.
Citation: He Y, Wang J, Wang L, Chen ZJ, Yan C, et al. (2009) Uncovering
Intrinsic Modular Organization of Spontaneous Brain Activity in Humans. PLoS
ONE 4(4): e5226. doi:10.1371/journal.pone.0005226
Comparing community structure identification
J. Stat. Mech. (2005) P... | bsd-3-clause |
duaneloh/Dragonfly | utils/autoplot.py | 1 | 42271 | #!/usr/bin/env python
'''Module containing Dragonfly Progress Viewer'''
from __future__ import print_function
import sys
import os
import argparse
import numpy as np
import h5py
try:
from PyQt5 import QtCore, QtWidgets, QtGui # pylint: disable=import-error
import matplotlib
matplotlib.use('qt5agg')
fr... | gpl-3.0 |
Cyberbio-Lab/bcbio-nextgen | bcbio/install.py | 1 | 31174 | """Handle installation and updates of bcbio-nextgen, third party software and data.
Enables automated installation tool and in-place updates to install additional
data and software.
"""
import argparse
import collections
import contextlib
import datetime
import dateutil
from distutils.version import LooseVersion
impor... | mit |
jcmgray/xarray | xarray/backends/api.py | 1 | 35346 | from __future__ import absolute_import, division, print_function
import os.path
from glob import glob
from io import BytesIO
from numbers import Number
import numpy as np
from .. import Dataset, backends, conventions
from ..core import indexing
from ..core.combine import auto_combine
from ..core.pycompat import base... | apache-2.0 |
cathalgarvey/deadlock | deadlock/passwords/wordlist.py | 1 | 717038 | wordlist = ["aardvark",
"aardwolf",
"aaron",
"aback",
"abacus",
"abaft",
"abalone",
"abandon",
"abandoned",
"abandonment",
"abandons",
"abase",
"abased",
"abasement",
"abash",
"abashed",
"abate",
"abated",
"abatement",
"abates",
"abattoir",
"abattoirs",
"abbe",
"abbess",
"abbey",
"abbeys",
"abbot",
"abbots",
"abbreviat... | agpl-3.0 |
StephanEwen/incubator-flink | flink-python/pyflink/table/table.py | 2 | 60911 | ################################################################################
# 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 |
danmoser/pyhdust | pyhdust/phc.py | 1 | 57428 | # -*- coding:utf-8 -*-
"""PyHdust *phc* module: physical constants and general use functions
Includes functions for:
- Geometrical functions in deg
- Data manipulation (average, bin, fitting)
- Manipulation of 3D coordinates
- Convolution functions
- Manipulation of strings and lists
- Manipulation of angular coordi... | gpl-3.0 |
jaekor91/xd-elg-scripts | XD_selection_module.py | 1 | 30899 | import numpy as np
import matplotlib.pyplot as plt
# For numba
import os
os.environ['NUMBA_NUM_THREADS'] = "1"
import numba as nb
# matplotlib ticks
import matplotlib as mpl
mpl.rcParams['xtick.major.size'] = 15
mpl.rcParams['xtick.major.width'] = 2.
mpl.rcParams['ytick.major.size'] = 15
mpl.rcParams['ytick.major.wid... | gpl-3.0 |
Silmathoron/PyNeurActiv | analysis/activity_properties.py | 1 | 58859 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of the PyNeurActiv project, which aims at providing tools
# to study and model the activity of neuronal cultures.
# Copyright (C) 2017 SENeC Initiative
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of th... | gpl-3.0 |
MMKrell/pyspace | pySPACE/resources/dataset_defs/performance_result.py | 1 | 75741 | """ Tabular listing data sets, parameters and a huge number of performance metrics
Store and load the performance results of an operation from a csv file,
select subsets of this results or for create various kinds of plots
**Special Static Methods**
:merge_performance_results:
Merge result*.csv files when... | gpl-3.0 |
majeau-bettez/pylcaio | pylcaio.py | 1 | 38345 | """pyLCAIO: handle and hybridize LCA and EEIO matrices
This module defines a class (LCAIO) that can structure, manipulate, and
facilitate the hybridization of lifecycle assessment (LCA) and environmentally
extended input-output (EEIO) matrices.
Dependencies
-------------
- numpy
- pandas
- scipy
- copy
- logging
Th... | gpl-2.0 |
kdebrab/pandas | pandas/core/groupby/groupby.py | 1 | 63120 | """
Provide the groupby split-apply-combine paradigm. Define the GroupBy
class providing the base-class of operations.
The SeriesGroupBy and DataFrameGroupBy sub-class
(defined in pandas.core.groupby.generic)
expose these user-facing objects to provide specific functionailty.
"""
import types
from functools import wr... | bsd-3-clause |
nens/threedi-wms | threedi_wms/threedi/responses.py | 1 | 51416 | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from threedi_wms.threedi import config
from threedi_wms.threedi import tasks
from threedi_wms.threedi import utils
from gislib import rasters
fr... | gpl-3.0 |
doordash/auto_ml | quantile_ml/predictor.py | 1 | 63227 | import datetime
import math
import os
import random
import sys
import warnings
import dill
import pathos
import numpy as np
import pandas as pd
# Ultimately, we (the authors of quantile_ml) are responsible for building a project that's robust against warnings.
# The classes of warnings below are ones we've deemed ac... | mit |
philouc/pyhrf | python/pyhrf/jde/beta.py | 1 | 252614 | # -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import numpy as _np
import scipy.interpolate
from pyhrf.boldsynth.pottsfield.swendsenwang import *
from pyhrf.boldsynth.field import *
import pyhrf
from pyhrf.stats.random import truncRandn, erf
from pyhrf.tools import resampleToGrid, get_2Dtable_string
from pyhrf ... | gpl-3.0 |
yl565/statsmodels | statsmodels/stats/weightstats.py | 4 | 49516 | '''Ttests and descriptive statistics with weights
Created on 2010-09-18
Author: josef-pktd
License: BSD (3-clause)
References
----------
SPSS manual
SAS manual
This follows in large parts the SPSS manual, which is largely the same as
the SAS manual with different, simpler notation.
Freq, Weight in SAS seems redu... | bsd-3-clause |
jbgastineau/cxphasing | cxphasing/CXPhasing.py | 1 | 48899 | """
.. module:: CXPhasing.py
:platform: Unix
:synopsis: Implements phase retrieval algorithms.
.. moduleauthor:: David Vine <djvine@gmail.com>
"""
import os
import numpy as np
import scipy as sp
from scipy.stats import poisson
import pylab
import time
import math
import pdb
from numpy.random import uniform, ... | mit |
majetideepak/arrow | python/pyarrow/tests/test_parquet.py | 1 | 98865 | # -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.