repo_name
string
path
string
copies
string
size
string
content
string
license
string
grlee77/scipy
scipy/spatial/kdtree.py
1
33793
# Copyright Anne M. Archibald 2008 # Released under the scipy license import numpy as np import warnings from .ckdtree import cKDTree, cKDTreeNode __all__ = ['minkowski_distance_p', 'minkowski_distance', 'distance_matrix', 'Rectangle', 'KDTree'] def minkowski_distance_p(x, y, p=2): """Compu...
bsd-3-clause
ubenu/Blits
src/blitspak/simulate_dialog.py
1
40036
''' Created on 1 Dec 2017 @author: SchilsM ''' #import sys import numpy as np import pandas as pd import copy as cp from statsmodels.stats.stattools import durbin_watson from PyQt5 import QtCore as qt from PyQt5 import QtGui as gui from PyQt5 import QtWidgets as widgets from blitspak.blits_mpl import MplCanvas, Navi...
gpl-3.0
wmvanvliet/mne-python
doc/conf.py
1
33453
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html import gc import os import sys import time import warnings fr...
bsd-3-clause
magic2du/contact_matrix
Contact_maps/DeepLearning/DeepLearningTool/DL_contact_matrix_load2-new10fold_11_05_2014_server.py
2
41825
# coding: utf-8 # In[3]: import sys, os sys.path.append('../../../libs/') import os.path import IO_class from IO_class import FileOperator from sklearn import cross_validation import sklearn import numpy as np import csv from dateutil import parser from datetime import timedelta from sklearn import svm import numpy ...
gpl-2.0
msincenselee/vnpy
vnpy/app/cta_crypto/back_testing.py
1
98407
# encoding: UTF-8 ''' 本文件中包含的是CTA模块的组合回测引擎,回测引擎的API和CTA引擎一致, 可以使用和实盘相同的代码进行回测。 华富资产 李来佳 ''' from __future__ import division import sys import os import importlib import csv import copy import pandas as pd import traceback import numpy as np import logging import socket import zlib import pickle from bson import binar...
mit
vortex-ape/scikit-learn
sklearn/model_selection/_validation.py
2
59947
""" The :mod:`sklearn.model_selection._validation` module includes classes and functions to validate the model. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Olivier Grisel <olivier.grisel@ensta.org> # Raghav RV <rvraghav93@gma...
bsd-3-clause
compmech/meshless
theory/espim/2D/plate/FSDT/transverse_shear_edge_based/espim_example.py
1
167214
"""ES-PIM - prevents non-zero energy spurious modes for vibration / buckling analysis as NS-PIM - compared to SFEM using TRIA3, this approach is very similar, but much easily extented to n-sided elements, since the integration is performed edge-wise - results more precise than FEM using QUAD4 elements """ import ...
bsd-2-clause
PanDAWMS/panda-jedi
pandajedi/jedidog/AtlasQueueFillerWatchDog.py
1
32083
import os import sys import copy import re import json import socket import datetime import traceback from six import iteritems from .WatchDogBase import WatchDogBase from pandajedi.jediconfig import jedi_config from pandajedi.jedicore.MsgWrapper import MsgWrapper from pandajedi.jedicore.ThreadUtils import ListWithLo...
apache-2.0
simpeg/discretize
discretize/base/base_tensor_mesh.py
1
47688
""" Base class for tensor-product style meshes """ import numpy as np import scipy.sparse as sp from discretize.base.base_mesh import BaseMesh from discretize.utils import ( is_scalar, as_array_n_by_dim, unpack_widths, mkvc, ndgrid, spzeros, sdiag, sdinv, TensorType, interpolat...
mit
alephu5/Soundbyte
environment/lib/python3.3/site-packages/pandas/core/ops.py
1
38973
""" Arithmetic operations for PandasObjects This is not a public API. """ # necessary to enforce truediv in Python 2.X from __future__ import division import operator import numpy as np import pandas as pd from pandas import compat, lib, tslib import pandas.index as _index from pandas.util.decorators import Appender i...
gpl-3.0
cschlosberg/me-class
methylation_interpolation.py
1
91637
### Custom container Class definitions class Window: def __init__(self,low,high,bins,bp_window_size=None): self.low = low self.high = high self.len = self.high-self.low self.bins = bins # print "Window Bins: ",self.bins self.x = list() self.x_raw_meth = list()...
gpl-3.0
rkmaddox/mne-python
mne/utils/docs.py
1
112764
# -*- coding: utf-8 -*- """The documentation functions.""" # Authors: Eric Larson <larson.eric.d@gmail.com> # # License: BSD (3-clause) from copy import deepcopy import inspect import os import os.path as op import sys import warnings import webbrowser from ..defaults import HEAD_SIZE_DEFAULT from ..externals.doccer ...
bsd-3-clause
aerospaceresearch/orbitdeterminator
orbitdeterminator/optimization/with_mcmc.py
1
44667
import numpy as np import emcee from astropy.time import Time from datetime import datetime, timedelta from astropy.coordinates import Longitude, SkyCoord from astropy import units as uts from astropy.coordinates import AltAz from astropy.coordinates import EarthLocation import astropy.units as u from skyfield.api im...
mit
kdebrab/pandas
pandas/core/indexes/interval.py
1
40793
""" define the IntervalIndex """ import textwrap import warnings import numpy as np from pandas.compat import add_metaclass from pandas.core.dtypes.missing import isna from pandas.core.dtypes.cast import find_common_type, maybe_downcast_to_dtype from pandas.core.dtypes.common import ( ensure_platform_int, is_...
bsd-3-clause
johnowhitaker/bobibabber
sklearn/preprocessing/data.py
1
38432
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # License: BSD 3 clause import numbers import warnings import itertools import numpy as np from scipy...
mit
cbertinato/pandas
pandas/io/sql.py
1
60126
""" Collection of query wrappers / abstractions to both facilitate data retrieval and to reduce dependency on DB-specific API. """ from contextlib import contextmanager from datetime import date, datetime, time from functools import partial import re import warnings import numpy as np import pandas._libs.lib as lib ...
bsd-3-clause
gfyoung/pandas
pandas/tests/io/parser/test_parse_dates.py
1
48096
""" Tests date parsing functionality for all of the parsers defined in parsers.py """ from datetime import date, datetime from io import StringIO from dateutil.parser import parse as du_parse from hypothesis import given, settings, strategies as st import numpy as np import pytest import pytz from pandas._libs.tslib...
bsd-3-clause
ahaldane/numpy
numpy/core/tests/test_multiarray.py
1
314281
from __future__ import division, absolute_import, print_function try: # Accessing collections abstract classes from collections # has been deprecated since Python 3.3 import collections.abc as collections_abc except ImportError: import collections as collections_abc import tempfile import sys import sh...
bsd-3-clause
nmartensen/pandas
pandas/core/indexes/multi.py
1
94933
# pylint: disable=E1101,E1103,W0232 import datetime import warnings from functools import partial 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 ...
bsd-3-clause
aflaxman/scikit-learn
sklearn/tests/test_pipeline.py
6
33631
""" Test the pipeline module. """ from tempfile import mkdtemp import shutil import time import numpy as np from scipy import sparse from sklearn.externals.six.moves import zip from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_raises_regex from sklearn.utils.testing import asse...
bsd-3-clause
icexelloss/spark
python/pyspark/serializers.py
1
31141
# # 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
jseabold/statsmodels
statsmodels/tsa/regime_switching/markov_switching.py
5
83115
""" Markov switching models Author: Chad Fulton License: BSD-3 """ import warnings import numpy as np import pandas as pd from scipy.special import logsumexp from statsmodels.tools.tools import Bunch from statsmodels.tools.numdiff import approx_fprime_cs, approx_hess_cs from statsmodels.tools.decorators import cache...
bsd-3-clause
maciejkula/scipy
scipy/optimize/nonlin.py
1
46481
r""" ================= Nonlinear solvers ================= .. currentmodule:: scipy.optimize This is a collection of general-purpose nonlinear multidimensional solvers. These solvers find *x* for which *F(x) = 0*. Both *x* and *F* can be multidimensional. Routines ======== Large-scale nonlinear solvers: .. autos...
bsd-3-clause
proetman/checkit
speedcam/home_lib.py
1
40656
""" Home Lib.py Generic Library """ import logging import collections import csv import mmap import os import socket import platform import tabulate import difflib import re import sys import time from datetime import datetime import pyodbc import pandas as pd import numpy as np # import racq_conn_lib as rqconnlib #...
gpl-2.0
plotly/plotly.py
packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_colorbar.py
1
73686
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattercarpet.marker" _path_str = "scattercarpet.marker.colorbar" _valid_props = { ...
mit
cython-testbed/pandas
pandas/tests/series/test_analytics.py
1
81415
# 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
georgebv/coastlib
coastlib/stats/distributions.py
1
35708
# coastlib, a coastal engineering Python library # Copyright (C), 2019 Georgii Bocharov # # 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) a...
gpl-3.0
LanguageMachines/quoll
quoll/classification_pipeline/functions/classifier.py
1
33993
from sklearn import preprocessing from sklearn import svm, naive_bayes, tree from sklearn.linear_model import Perceptron, LogisticRegression, LinearRegression from sklearn.neighbors import KNeighborsClassifier from xgboost import XGBClassifier from sklearn.model_selection import GridSearchCV, RandomizedSearchCV from s...
gpl-3.0
cdd1969/pygwa
lib/functions/plot_pandas.py
1
32919
''' MODULE CONTAINING PLOTTING FUNCTIONS... ''' import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import math def r_squared(actual, ideal): ''' Calculate coefficient of determination (R2) actual - 1D-array of y-values of measured points ideal ...
gpl-2.0
Featuretools/featuretools
featuretools/computational_backends/calculate_feature_matrix.py
1
30761
import logging import math import os import shutil import time import warnings from datetime import datetime import cloudpickle import numpy as np import pandas as pd from featuretools.computational_backends.feature_set import FeatureSet from featuretools.computational_backends.feature_set_calculator import ( Fea...
bsd-3-clause
badbytes/pymeg
gui/gtk/pymeg.py
1
59177
#!/usr/bin/python2 # pymeg.py # # Copyright 2010 dan collins <danc@badbytes.net> # # 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,...
gpl-3.0
grlee77/numpy
numpy/linalg/linalg.py
1
89490
"""Lite version of scipy.linalg. Notes ----- This module is a lite version of the linalg.py module in SciPy which contains high-level Python interface to the LAPACK library. The lite version only accesses the following LAPACK functions: dgesv, zgesv, dgeev, zgeev, dgesdd, zgesdd, dgelsd, zgelsd, dsyevd, zheevd, dgetr...
bsd-3-clause
theavey/ParaTemp
paratemp/energy_histo.py
1
30028
#! /usr/bin/env python ######################################################################## # # # This script was written by Thomas Heavey in 2016-17. # # theavey@bu.edu thomasjheavey@gmail.com # # ...
apache-2.0
ljwolf/pysal
pysal/esda/moran.py
1
56931
""" Moran's I Spatial Autocorrelation Statistics """ __author__ = "Sergio J. Rey <srey@asu.edu>, \ Dani Arribas-Bel <daniel.arribas.bel@gmail.com>" from ..weights.spatial_lag import lag_spatial as slag from .smoothing import assuncao_rate from .tabular import _univariate_handler, _bivariate_handler import scip...
bsd-3-clause
jakobrunge/tigramite
tigramite/models.py
1
57215
"""Tigramite causal discovery for time series.""" # Author: Jakob Runge <jakob@jakob-runge.com> # # License: GNU General Public License v3.0 from __future__ import print_function from copy import deepcopy import numpy as np from tigramite.data_processing import DataFrame from tigramite.pcmci import PCMCI # try: im...
gpl-3.0
dricciardelli/vae2vec
def_def_single.py
1
37251
''' Significant lifting from https://jmetzen.github.io/2015-11-27/vae.html ''' import time import numpy as np import tensorflow as tf from tensorflow.python.ops import rnn import random import matplotlib.pyplot as plt import re, string from sklearn.feature_extraction.text import CountVectorizer from collections impo...
mit
ay-lab/fithic
fithic/fithic.py
1
59448
#!/usr/bin/env python ''' Created on Jan 29, 2014 by Ferhat Ay Modified by Arya Kaul 2017-Present ''' import sys import math import time import numpy as np from scipy import * from scipy.interpolate import Rbf, UnivariateSpline from scipy import optimize import scipy.special as scsp import bisect import gzip from sci...
mit
Ledoux/ShareYourSystem
Pythonlogy/ShareYourSystem/Standards/Viewers/Pyploter/__init__.py
2
51979
# -*- coding: utf-8 -*- """ <DefineSource> @Date : Fri Nov 14 13:20:38 2014 \n @Author : Erwan Ledoux \n\n </DefineSource> A Pyploter """ #<DefineAugmentation> import ShareYourSystem as SYS BaseModuleStr="ShareYourSystem.Standards.Viewers.Viewer" DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer" SY...
mit
arthurfait/HMM-3
Gen_Synthetic_Data/GMMHMM/algo_HMM.py
1
86967
''' This file contains the main algorithms used to train the hmms, namely forward,backward,viterbi and baum-welch TODO: tests ''' try: import psyco psyco.full() except: pass # Usually we use nicknames for the states and links # # B = {Begin}, E= {all emitting states}, N={all null States} # S ={ all states} = B U E...
gpl-3.0
chrsrds/scikit-learn
sklearn/linear_model/tests/test_sgd.py
1
58198
from distutils.version import LooseVersion import pickle import pytest import numpy as np import scipy.sparse as sp import joblib from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.te...
bsd-3-clause
ToFuProject/tofu
tofu/geom/_core.py
1
285354
""" This module is the geometrical part of the ToFu general package It includes all functions and object classes necessary for tomography on Tokamaks """ # Built-in import os import warnings import copy import inspect # Common import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt # ToFu-specifi...
mit
gbrammer/grizli
grizli/model.py
1
191551
""" Model grism spectra in individual FLTs """ import os from collections import OrderedDict import copy import numpy as np import scipy.ndimage as nd import matplotlib.pyplot as plt import astropy.io.fits as pyfits from astropy.table import Table import astropy.wcs as pywcs import astropy.units as u #import stwcs ...
mit
JPalmerio/GRB_population_code
grbpop/GRB_population.py
1
38776
# General python imports import numpy as np import matplotlib.pyplot as plt import pandas as pd import logging import yaml import pickle from pathlib import Path import scipy.integrate as integrate # GRB population specific imports import stats as st import physics as ph import functional_forms as ff import f90_functio...
gpl-3.0
ubuntuslave/omnistereo_sensor_design
omnistereo/camera_models.py
1
118858
# -*- coding: utf-8 -*- # camera_models.py # Copyright (c) 20012-2016, Carlos Jaramillo # Produced at the Laboratory for Robotics and Intelligent Systems of the City College of New York # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
gpl-3.0
duncanmmacleod/gwpy
gwpy/timeseries/core.py
1
58948
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2014-2020) # # This file is part of GWpy. # # GWpy 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)...
gpl-3.0
jaekor91/xd-elg-scripts
xd_elg_utils.py
1
81633
import numpy as np import numpy.lib.recfunctions as rec from astropy.io import ascii, fits from astropy.wcs import WCS from astropy.coordinates import SkyCoord from astropy import units as u from os import listdir from os.path import isfile, join import scipy.stats as stats import scipy.optimize as opt import matplo...
gpl-3.0
alexsavio/scikit-learn
sklearn/model_selection/tests/test_split.py
1
42493
"""Test the split module""" from __future__ import division import warnings import numpy as np from scipy.sparse import coo_matrix, csc_matrix, csr_matrix from scipy import stats from scipy.misc import comb from itertools import combinations from sklearn.utils.fixes import combinations_with_replacement from sklearn.u...
bsd-3-clause
jamestwebber/scipy
scipy/optimize/minpack.py
1
34279
from __future__ import division, print_function, absolute_import import threading import warnings from . import _minpack import numpy as np from numpy import (atleast_1d, dot, take, triu, shape, eye, transpose, zeros, prod, greater, array, all, where, isscalar, asarray, inf, abs,...
bsd-3-clause
cython-testbed/pandas
pandas/io/excel.py
1
62232
""" Module parse to/from Excel """ # --------------------------------------------------------------------- # ExcelFile class from datetime import datetime, date, time, MINYEAR, timedelta import os import abc import warnings from textwrap import fill from io import UnsupportedOperation from distutils.version import Lo...
bsd-3-clause
jmschrei/PyPore
PyPore/DataTypes.py
1
43672
#!/usr/bin/env python # Contact: Jacob Schreiber # jacobtribe@soe.ucsc.com # DataTypes.py ''' DataTypes.py contains several classes meant to hold and organize common types of nanopore experimental data. The most common usage involves creating a file from a .abf file, and then parsing it to get events, and th...
mit
aarchiba/scipy
scipy/optimize/minpack.py
1
33994
from __future__ import division, print_function, absolute_import import threading import warnings from . import _minpack import numpy as np from numpy import (atleast_1d, dot, take, triu, shape, eye, transpose, zeros, prod, greater, array, all, where, isscalar, asarray, inf, abs,...
bsd-3-clause
CospanDesign/python
opencv/opencv_demo.py
1
48590
#! /usr/bin/env python # Copyright (c) 2015 Dave McCoy (dave.mccoy@cospandesign.com) # # NAME 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 # any later version. # # NAME ...
mit
TomAugspurger/pandas
pandas/tests/scalar/period/test_asfreq.py
1
36358
import pytest from pandas._libs.tslibs.frequencies import INVALID_FREQ_ERR_MSG, _period_code_map from pandas.errors import OutOfBoundsDatetime from pandas import Period, Timestamp, offsets class TestFreqConversion: """Test frequency conversion of date objects""" @pytest.mark.parametrize("freq", ["A", "Q", ...
bsd-3-clause
anntzer/seaborn
seaborn/tests/test_categorical.py
1
105379
import numpy as np import pandas as pd from scipy import stats, spatial import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.colors import rgb2hex from distutils.version import LooseVersion import pytest import nose.tools as nt import numpy.testing as npt from .. import categorical as cat from .. ...
bsd-3-clause
Tong-Chen/scikit-learn
sklearn/metrics/tests/test_metrics.py
1
96539
from __future__ import division, print_function import numpy as np from functools import partial from itertools import product import warnings from sklearn import datasets from sklearn import svm from sklearn.preprocessing import LabelBinarizer from sklearn.datasets import make_multilabel_classification from sklearn...
bsd-3-clause
geopandas/geopandas
geopandas/tests/test_geodataframe.py
1
36305
import json import os import shutil import tempfile from distutils.version import LooseVersion import numpy as np import pandas as pd import pyproj from pyproj import CRS from pyproj.exceptions import CRSError from shapely.geometry import Point import geopandas from geopandas import GeoDataFrame, GeoSeries, read_fil...
bsd-3-clause
MartinPyka/Pam-Utils
pamutils/network.py
1
34485
# -*- coding: utf-8 -*- """ Created on Wed Feb 25 20:54:14 2015 @author: ubuntu """ import matplotlib.pyplot as mp import matplotlib from nest import * import nest.voltage_trace import nest.raster_plot import io import StringIO import csv import numpy as np import pickle import zipfile import pamutils.pam2nest as...
gpl-2.0
cheral/orange3
Orange/widgets/visualize/owvenndiagram.py
1
53996
""" Venn Diagram Widget ------------------- """ import math import unicodedata from collections import namedtuple, defaultdict, OrderedDict, Counter from itertools import count from functools import reduce from xml.sax.saxutils import escape import numpy from AnyQt.QtWidgets import ( QComboBox, QGraphicsScene, ...
bsd-2-clause
BoldingBruggeman/gotm
gui.py/xmlplot/gui_qt4.py
1
76307
# Import modules from standard Python (>= 2.4) library import datetime, os.path, sys # Import third-party modules from xmlstore.qt_compat import QtGui,QtCore import numpy import matplotlib.figure from matplotlib.backends.backend_agg import FigureCanvasAgg import matplotlib.lines # Import our own custom modules import...
gpl-2.0
compmech/meshless
scratch/espim_example.py
1
153233
"""ES-PIM - prevents non-zero energy spurious modes for vibration / buckling analysis as NS-PIM - compared to SFEM using TRIA3, this approach is very similar, but much easily extented to n-sided elements, since the integration is performed edge-wise - results more precise than FEM using QUAD4 elements """ import ...
bsd-2-clause
mozafari/verdict
verdict/core/querying2.py
1
48170
"""This module contains the query processing logic. """ import concurrent.futures import copy import json import math import pandas as pd import pdb import pprint import queue import threading from typing import Callable, List from ..interface import * from ..common.logging import * from ..common.tools import * cla...
apache-2.0
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated
python-packages/mne-python-0.10/mne/decoding/time_gen.py
1
51427
# Authors: Jean-Remi King <jeanremi.king@gmail.com> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # Clement Moutard <clement.moutard@gmail.com> # # License: BSD (3-clause) import numpy as np import copy from ..io.pick import pick_...
bsd-3-clause
gdrouart/MrMoose
graphics.py
1
36874
""" MrMoose: A multi-wavelength, multi-resolution, multi-sources fitting code. Allow to simultaneously fit multiple models in order to interpret the spectral energy distribution of an astrophysical source from simple to more complex case, making use of a bayesian framework. Copyright (C) 2017 Guillaume Drouart, There...
gpl-3.0
pywr/pywr
tests/test_recorders.py
1
83682
# -*- coding: utf-8 -*- """ Test the Recorder object API """ import pywr.core from pywr.core import Model, Input, Output, Scenario, AggregatedNode import numpy as np import pandas import pytest import tables import json from numpy.testing import assert_allclose, assert_equal from fixtures import simple_linear_model, s...
gpl-3.0
oscarlazoarjona/quantum_memories
quantum_memories/hyperfine_orca.py
1
45862
# -*- coding: utf-8 -*- # *********************************************************************** # Copyright (C) 2016 - 2017 Oscar Gerardo Lazo Arjona * # 2017 Benjamin Brecht * # <oscar.lazoarjona@physics.ox.ac.uk> * ...
gpl-3.0
zak-k/cartopy
lib/cartopy/mpl/geoaxes.py
1
78645
# (C) British Crown Copyright 2011 - 2017, Met Office # # This file is part of cartopy. # # cartopy is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option)...
lgpl-3.0
Transkribus/TranskribusDU
TranskribusDU/gcn/tests/UT_gcn.py
1
35703
# -*- coding: utf-8 -*- import pdb import random __author__ = 'sclincha' import operator import sys,os sys.path.append('../..') import numpy as np import unittest import pickle import tensorflow as tf from tensorflow.python.client import timeline import scipy.sparse as sp try: #to ease the use without proper Pytho...
bsd-3-clause
nisse3000/pymatgen
pymatgen/electronic_structure/plotter.py
1
183163
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals, print_function import logging import math import itertools import warnings from collections import OrderedDict import six import numpy as np from monty.json ...
mit
kushalbhola/MyStuff
Practice/PythonApplication/env/Lib/site-packages/pandas/core/internals/blocks.py
1
111710
from datetime import date, datetime, timedelta import functools import inspect import re from typing import Any, List import warnings import numpy as np from pandas._libs import NaT, lib, tslib, tslibs import pandas._libs.internals as libinternals from pandas._libs.tslibs import Timedelta, conversion from pandas._lib...
apache-2.0
dutch-rob/compare-formulas-in-excel-files
xlwings_rb/main.py
1
37860
""" xlwings - Make Excel fly with Python! Homepage and documentation: http://xlwings.org See also: http://zoomeranalytics.com Copyright (C) 2014, Zoomer Analytics LLC. All rights reserved. License: BSD 3-clause (see LICENSE.txt for details) """ import sys import numbers from . import xlplatform, string_types, time_t...
gpl-2.0
spennihana/h2o-3
h2o-py/h2o/grid/grid_search.py
1
35730
# -*- encoding: utf-8 -*- from __future__ import division, print_function, absolute_import, unicode_literals import itertools import h2o from h2o.job import H2OJob from h2o.frame import H2OFrame from h2o.exceptions import H2OValueError from h2o.estimators.estimator_base import H2OEstimator from h2o.two_dim_table impo...
apache-2.0
lidavidm/mathics-heroku
venv/lib/python2.7/site-packages/sympy/geometry/ellipse.py
1
36305
"""Elliptical geometrical entities. Contains * Ellipse * Circle """ from sympy.core import S, C, sympify, pi, Dummy from sympy.core.logic import fuzzy_bool from sympy.core.numbers import oo from sympy.simplify import simplify, trigsimp from sympy.functions.elementary.miscellaneous import sqrt, Max, Min from sympy.fu...
gpl-3.0
amcw7777/python-exercises
cs177/project3/tabulate.py
1
30185
# -*- coding: utf-8 -*- """Pretty-print tabular data.""" from __future__ import print_function from __future__ import unicode_literals from collections import namedtuple from platform import python_version_tuple import re if python_version_tuple()[0] < "3": from itertools import izip_longest from functools ...
apache-2.0
Delosari/dazer
bin/lib/ssp_functions/ssp_synthesis_tools_v0.py
1
37364
from errno import ENOENT from os import remove, getcwd from sys import argv, exit from collections import OrderedDict from pandas import DataFrame, read_csv from astropy.io.fits impo...
mit
jiaxunsongucb/mini-library
code/library_system.py
1
49632
# -*- coding: utf-8 -*- import re from collections import deque from datetime import datetime import getpass # 输入密码 import numpy as np import pandas as pd import sqlite3 as sql from spider import * import logging import sys import traceback import os from shutil import rmtree, copyfile import platform f...
mit
3324fr/spinalcordtoolbox
dev/old/sct_straighten_spinalcord__testing.py
1
144941
#!/usr/bin/env python ## @package sct_straighten_spinalcord # # - run a gaussian weighted slice by slice registration over a machine to straighten the spinal cord. # - use the centerline previously calculated during the registration but fitted with spline interpolation to improve the spinal cord straightening # - find...
mit
cloudera/ibis
ibis/backends/base_sqlalchemy/alchemy.py
1
48611
import contextlib import functools import operator from typing import List, Optional import pandas as pd import sqlalchemy as sa import sqlalchemy.sql as sql from pkg_resources import parse_version from sqlalchemy.dialects.mysql.base import MySQLDialect from sqlalchemy.dialects.postgresql.base import PGDialect as Post...
apache-2.0
makinacorpus/formhub
utils/export_tools.py
1
30390
import os import re import csv from openpyxl.workbook import Workbook import json from bson import json_util from datetime import datetime from django.conf import settings from pyxform.section import Section, RepeatingSection from pyxform.question import Question from django.core.files.base import File from django.core...
bsd-2-clause
boland1992/seissuite_iran
bin/02_timeseries_process.py
1
34628
#!/usr/bin/python -u """ [Advice: run this script using python with unbuffered output: `python -u 01_timeseries_process.py`] This script reads seismic waveform data from a set of stations, and calculates the cross-correlations between all pairs of stations. The data (in miniseed format) must be located in folder *MSEE...
gpl-3.0
bajibabu/merlin
misc/recipes/MGE/run_mge_dnn.py
2
43353
import pickle import gzip import os, sys, errno import time import math # 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 cases, not sure why this doesn't get imported with numpy itse...
apache-2.0
dkasak/pacal
pacal/indeparith.py
1
57228
"""Probabilistic arithmetic on independent random variables.""" import itertools from functools import partial import bisect import operator from numpy import asfarray from numpy import multiply, add, divide from numpy import unique, isnan, isscalar, size from numpy import sign, isinf, isfinite from numpy import mini...
gpl-3.0
CGATOxford/CGATPipelines
CGATPipelines/pipeline_rnaseqdiffexpression.py
1
53106
"""======================================== RNA-Seq Differential expression pipeline ======================================== The RNA-Seq differential expression pipeline performs differential expression analysis. It requires three inputs: 1. A geneset in :term:`gtf` formatted file 2. Mapped reads in :term:`ba...
mit
apbard/scipy
scipy/signal/ltisys.py
1
116403
""" ltisys -- a collection of classes and functions for modeling linear time invariant systems. """ from __future__ import division, print_function, absolute_import # # Author: Travis Oliphant 2001 # # Feb 2010: Warren Weckesser # Rewrote lsim2 and added impulse2. # Apr 2011: Jeffrey Armstrong <jeff@approximatrix.co...
bsd-3-clause
tectronics/mwavepy
mwavepy/network.py
1
62496
# network.py # # # Copyright 2010 alex arsenovic <arsenovic@virginia.edu> # Copyright 2010 lihan chen # # 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 Fo...
gpl-3.0
cowlicks/dask
dask/dataframe/tests/test_arithmetics_reduction.py
1
33920
from datetime import datetime import pytest import numpy as np import pandas as pd from dask.utils import raises import dask.dataframe as dd from dask.dataframe.utils import eq, assert_dask_graph, make_meta @pytest.mark.slow def test_arithmetics(): dsk = {('x', 0): pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]},...
bsd-3-clause
ComparativeGenomicsToolkit/Comparative-Annotation-Toolkit
cat/consensus.py
1
58711
""" Generates consensus gene set. This module takes as input the genePreds produced by transMap, AugustusTM(R) and AugustusCGP and generates a consensus of these, producing a filtered gene set. This process relies on a combination of metrics and evaluations loaded to a sqlite database by the classify module. GFF3 t...
apache-2.0
ME-ICA/me-ica
meica.py
1
44053
#!/usr/bin/env python __version__="v3.2 beta1" welcome_block=""" # Multi-Echo ICA, Version %s # # Kundu, P., Brenowitz, N.D., Voon, V., Worbe, Y., Vertes, P.E., Inati, S.J., Saad, Z.S., # Bandettini, P.A. & Bullmore, E.T. Integrated strategy for improving functional # connectivity mapping using multiecho fMRI. PNAS (...
lgpl-2.1
kedz/cuttsum
trec2015/sbin/l2s/idea.py
1
41379
import cuttsum.events import cuttsum.corpora from cuttsum.pipeline import InputStreamResource from mpi4py import MPI from cuttsum.misc import enum from cuttsum.classifiers import NuggetRegressor import numpy as np import pandas as pd import random import pyvw from datetime import datetime from sklearn.feature_extractio...
apache-2.0
openego/eTraGo
etrago/tools/utilities.py
1
56402
# -*- coding: utf-8 -*- # Copyright 2016-2018 Flensburg University of Applied Sciences, # Europa-Universität Flensburg, # Centre for Sustainable Energy Systems, # DLR-Institute for Networked Energy Systems # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Affero G...
agpl-3.0
cloudera/ibis
ibis/tests/sql/test_compiler.py
1
69036
import datetime import unittest import pytest import ibis import ibis.expr.api as api import ibis.expr.operations as ops from ibis.backends.base_sql.compiler import BaseDialect, build_ast, to_sql from ibis.tests.expr.mocks import MockConnection pytest.importorskip('sqlalchemy') class TestASTBuilder(unittest.TestCa...
apache-2.0
pcrumley/Iseult
src/main_app.py
1
160238
#! /usr/bin/env python import re # regular expressions import os, sys # Used to make the code portable import h5py # Allows us the read the data files import time, string, io from PIL import Image import matplotlib matplotlib.use('TkAgg') import new_cmaps import numpy as np from collections import deque import matplotl...
gpl-3.0
fboers/jumeg
jumeg/jumeg_utils.py
1
49986
''' Utilities module for jumeg ''' # Authors: Jurgen Dammers (j.dammers@fz-juelich.de) # Praveen Sripad (pravsripad@gmail.com) # Eberhard Eich (e.eich@fz-juelich.de) () # # License: BSD (3-clause) import sys import os import os.path as op import fnmatch import numpy as np import scipy as sci from s...
bsd-3-clause
mkukielka/oddt
oddt/toolkits/extras/rdkit/fixer.py
1
43688
from __future__ import division, print_function, absolute_import import os from collections import OrderedDict from itertools import combinations, chain import sys from six.moves import urllib import numpy as np import pandas as pd from scipy.spatial.distance import cdist from rdkit import RDLogger from rdkit import...
bsd-3-clause
liantian-cn/ms17_010_scanner_gui
lib/appJar/appjar.py
1
300568
# -*- coding: utf-8 -*- """appJar.py: Provides a GUI class, for making simple tkinter GUIs.""" # Nearly everything I learnt came from: http://effbot.org/tkinterbook/ # with help from: http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html # with snippets from stackexchange.com # make print backwards compatible f...
unlicense
ATNF/askapsdp
Tools/Dev/epicsdb/askapdev/epicsdb/AdbeParser.py
1
80262
from __future__ import print_function import os, sys, shutil import glob import time from xml.parsers.expat import ExpatError, ErrorString from xml.etree import ElementTree as etree import re import string from .epics_db import OrderedDict, EpicsRecord, EpicsDB #TODO # need to replace boy xml write with Etree so xml...
gpl-2.0
Eigenstate/msmbuilder
msmbuilder/featurizer/featurizer.py
1
66359
# Author: Kyle A. Beauchamp <kyleabeauchamp@gmail.com> # Contributors: Robert McGibbon <rmcgibbo@gmail.com>, # Matthew Harrigan <matthew.p.harrigan@gmail.com> # Brooke Husic <brookehusic@gmail.com>, # Muneeb Sultan <msultan@stanford.edu> # Robin Betz <robin@robinb...
lgpl-2.1
sterbini/MDToolbox
myToolbox.py
1
35677
# This sucks! print('Version 0.03. This is the latest version.') print('Please help me to improve it reporting bugs to guido.sterbini@cern.ch.') # Fixes with respect to v0.2. # unixtime2datetimeVectorize modified len with np.size # Fixes with respect to v0.1. # Fixed the bug of the local/UTC time in importing the matl...
mit
dricciardelli/vae2vec
def_def_oh_eb.py
1
36534
''' Significant lifting from https://jmetzen.github.io/2015-11-27/vae.html ''' import time import numpy as np import tensorflow as tf from tensorflow.python.ops import rnn import random import matplotlib.pyplot as plt import re, string from sklearn.feature_extraction.text import CountVectorizer from collections impo...
mit
wmvanvliet/mne-python
mne/inverse_sparse/mxne_optim.py
1
58424
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Daniel Strohmeier <daniel.strohmeier@gmail.com> # Mathurin Massias <mathurin.massias@gmail.com> # License: Simplified BSD import functools from math import sqrt import numpy as np from .mxne_debiasing import compute_bias from ..utils import...
bsd-3-clause
plotly/plotly.py
packages/python/plotly/plotly/matplotlylib/renderer.py
1
35485
""" 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 six import warnings import plotly.graph_objs as go from plotly.matplo...
mit