repo_name
string
path
string
copies
string
size
string
content
string
license
string
cython-testbed/pandas
pandas/core/dtypes/cast.py
1
45059
""" routings for casting """ from datetime import datetime, timedelta import numpy as np import warnings from pandas._libs import tslib, lib, tslibs from pandas._libs.tslibs import iNaT, OutOfBoundsDatetime from pandas.compat import string_types, text_type, PY3 from .common import (ensure_object, is_bool, is_integer...
bsd-3-clause
jrcohen02/brainx_archive2
brainx/util.py
1
46884
"""Generic utilities that may be needed by the other modules. """ #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- import warnings import numpy as np import networkx as nx #-------------------------...
bsd-3-clause
jmmauricio/pypstools
build/lib/pypstools/tools.py
1
39391
""" Tools for dealing with power system data and results. (c) 2015 Juan Manuel Mauricio """ import numpy as np import scipy.linalg import scipy.integrate import pandas as pd import h5py from StringIO import StringIO def dict_to_h5(file_name, dict_in, dict_deepness=3): ''' Saves a dictionary to hdf5 file >...
gpl-3.0
emunsing/pyiso
tests/test_caiso.py
1
32288
import os from pyiso import client_factory from unittest import TestCase, expectedFailure, skip from io import StringIO import pandas as pd import pytz from datetime import date, datetime, timedelta from bs4 import BeautifulSoup import numpy import mock import requests fixtures_base_path = os.path.join(os.path.dirname...
apache-2.0
morris254/polymode
Polymode/Waveguide.py
5
82636
# _*_ coding=utf-8 _*_ # #--------------------------------------------------------------------------------- #Copyright © 2009 Andrew Docherty # #This program is part of Polymode. #Polymode is free software: you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the ...
gpl-3.0
Wapaul1/ray
python/ray/worker.py
1
109810
from __future__ import absolute_import from __future__ import division from __future__ import print_function import atexit import cloudpickle as pickle import collections import colorama import copy import hashlib import inspect import json import numpy as np import os import redis import signal import sys import thre...
apache-2.0
darionyaphet/flink
flink-python/pyflink/table/table_environment.py
1
87180
################################################################################ # 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
tepickering/mmtwfs
mmtwfs/zernike.py
1
49016
# Licensed under a 3-clause BSD style license - see LICENSE.rst # coding=utf-8 """ A collection of functions and classes for performing wavefront analysis using Zernike polynomials. Several of these routines were adapted from https://github.com/tvwerkhoven/libtim-py. They have been updated to make them more applicable...
gpl-3.0
gertingold/scipy
scipy/special/add_newdocs.py
1
197889
# Docstrings for generated ufuncs # # The syntax is designed to look like the function add_newdoc is being # called from numpy.lib, but in this file add_newdoc puts the # docstrings in a dictionary. This dictionary is used in # _generate_pyx.py to generate the docstrings for the ufuncs in # scipy.special at the C level...
bsd-3-clause
StuartLittlefair/astropy
astropy/table/tests/test_table.py
1
101279
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from astropy.utils.tests.test_metadata import MetaBaseTest import gc import sys import copy from io import StringIO from collections import OrderedDict import pickle import pytest import numpy as np from numpy.testing import asser...
bsd-3-clause
chrsrds/scikit-learn
sklearn/model_selection/tests/test_validation.py
1
71802
"""Test the validation module""" import sys import warnings import tempfile import os from time import sleep import pytest import numpy as np from scipy.sparse import coo_matrix, csr_matrix from sklearn.exceptions import FitFailedWarning from sklearn.model_selection.tests.test_search import FailingClassifier from s...
bsd-3-clause
UT-CWE/Hyospy
Hyospy_ensemble/lib/SUNTANS/Utils/timeseries.py
1
43648
# -*- coding: utf-8 -*- """ Collection of tools for plotting and analysis of time series data Created on Wed Feb 06 12:37:17 2013 Author: Matt Rayson Stanford University """ import numpy as np import matplotlib.pyplot as plt from matplotlib import mlab from matplotlib.lines import Line2D from scipy impor...
mit
roshantha9/AbstractManycoreSim
src/analyse_results/AnalyseResults_Exp_HEVCSplitTiles_SmartMemSelection.py
1
77352
import sys, os, csv, pprint, math #sys.path.append(os.path.join(os.path.dirname(__file__), '..')) ## uncomment when running under CLI only version ## #import matplotlib #matplotlib.use('Agg') #sys.path.append("/shared/storage/cs/staffstore/hrm506/simpy-3.0.5/") #sys.path.append("/shared/storage/cs/staffstore/hrm506/...
gpl-3.0
legacysurvey/legacypipe
py/legacypipe/fit_on_coadds.py
1
31634
""" Module to generate tims from coadds, to allow Tractor fitting to the coadds rather than to the individual CCDs. """ import numpy as np class Duck(object): pass def _build_objmask(img, ivar, skypix, boxcar=5, boxsize=1024): """ Build an object mask by doing a quick estimate of the sky background on a ...
bsd-3-clause
jshleap/Biogeography
biogeographer.py
1
63976
#!/usr/bin/python """ biogeographer Copyright (C) 2012 Jose Sergio Hleap This Script will fetch results from GBIF for macoecological and biogeografical studies. It is Based on the BioGeography is a module under development by Nick Matzke for a Google Summer of Code 2009 project. It is run through NESCENT's Phyloinform...
gpl-3.0
kou/arrow
python/pyarrow/tests/test_array.py
3
93104
# 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
datapythonista/pandas
pandas/tests/indexing/test_coercion.py
2
40037
from datetime import timedelta import itertools from typing import ( Dict, List, ) import numpy as np import pytest from pandas.compat import ( IS64, is_platform_windows, ) import pandas as pd import pandas._testing as tm ############################################################### # Index / Seri...
bsd-3-clause
credp/lisa
lisa/analysis/tasks.py
1
43232
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2015, ARM Limited and contributors. # # 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 # # ...
apache-2.0
hammerlab/cohorts
cohorts/cohort.py
1
69451
# Copyright (c) 2017. Mount Sinai School of Medicine # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
chitrangpatel/presto
lib/python/sifting.py
1
54180
#!/usr/bin/env python import sys import re import os import copy import numpy as Num import matplotlib import matplotlib.pyplot as plt from presto import candidate_sigma # Note: the following are global variables that can # (and should) be set in whatever module # imports this file. The following values...
gpl-2.0
xudesheng/commission-analytics
ca/ca_utility.py
1
63755
import os import sys import csv import numpy try: import ConfigParser except: import configparser import pandas as pd sys.path.append(".") try: from . import casession from . import algorithm except: import casession import algorithm def combine_manager_sales(ca_session, algorithm_key): ...
gpl-3.0
bajibabu/merlin
src/work_in_progress/oliver/dnn_synth_PROJECTION.py
2
46492
import pickle import gzip import os, sys, errno import time import math import glob import struct import copy from lxml import etree # numpy & theano imports need to be done in this order (only for some numpy installations, not sure why) import numpy # we need to explicitly import this in some cases, not sure why ...
apache-2.0
sonapraneeth-a/object-classification
library/tf/models/MLPClassifier.py
1
39722
import tensorflow as tf from sklearn.metrics import confusion_matrix, classification_report, accuracy_score from sklearn.model_selection import train_test_split import matplotlib.pyplot as plt import numpy as np from library.utils import file_utils from library.tf import Layers from library.plot_tools import plot_tools...
mit
weiHelloWorld/accelerated_sampling_with_autoencoder
MD_simulation_on_alanine_dipeptide/current_work/src/molecule_spec_sutils.py
1
49057
"""Sutils: simulation unilities, some of them are molecule-specific (implemented as methods in subclasses) """ from config import * import random, mdtraj as md from coordinates_data_files_list import * from sklearn.cluster import KMeans from helper_func import * from functools import reduce class Sutils(object): ...
mit
khs26/pele
pele/utils/disconnectivity_graph.py
1
46672
import copy from itertools import izip from collections import deque import numpy as np import networkx as nx from pele.landscape import database2graph __all__ = ["DisconnectivityGraph"] class TreeLeastCommonAncestor(object): """Find the least common ancestor to a set of trees""" def __init__(self, trees)...
gpl-3.0
lupien/pyHegel
pyHegel/gen_poly.py
1
30296
# -*- coding: utf-8 -*- ########################## Copyrights and license ############################ # # # Copyright 2011-2015 Christian Lupien <christian.lupien@usherbrooke.ca> # # ...
lgpl-3.0
chrisdjscott/Atoman
atoman/gui/preferences.py
1
35864
""" Preferences dialog. @author: Chris Scott """ from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import os import logging import datetime import multiprocessing as mp import functools from PySide2 import QtGui, QtCore, QtWidgets import numpy as n...
mit
microsoft/EconML
econml/dr/_drlearner.py
1
71354
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """ Doubly Robust Learner. The method uses the doubly robust correction to construct doubly robust estimates of all the potential outcomes of each samples. Then estimates a CATE model by regressing the potential outcome diffe...
mit
timothyb0912/pylogit
tests/test_bootstrap_controller.py
1
52763
""" Tests for the bootstrap.py (formerly bootstrap_controller.py) file. """ import unittest from collections import OrderedDict import numpy as np import numpy.testing as npt import pandas as pd from scipy.sparse import csr_matrix, eye import pylogit.bootstrap as bc import pylogit.asym_logit as asym import pylogit.mi...
bsd-3-clause
gfyoung/scipy
scipy/stats/_distn_infrastructure.py
1
118271
# # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from __future__ import division, print_function, absolute_import from scipy._lib.six import string_types, exec_, PY3 from scipy._lib._util import getargspec_no_self as _getargspec import sys import keyword import r...
bsd-3-clause
datapythonista/pandas
pandas/tests/io/excel/test_readers.py
1
54516
from datetime import ( datetime, time, ) from functools import partial import os from urllib.error import URLError from zipfile import BadZipFile import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, S...
bsd-3-clause
merenlab/anvio
anvio/db.py
1
39504
# -*- coding: utf-8 # pylint: disable=line-too-long """ Low-level db operations. """ import os import time import math import numpy import pandas as pd import sqlite3 import warnings import anvio import anvio.tables as tables import anvio.terminal as terminal import anvio.filesnpaths as filesnpaths from anvio.er...
gpl-3.0
GuessWhoSamFoo/pandas
pandas/core/arrays/datetimelike.py
1
54430
# -*- coding: utf-8 -*- from datetime import datetime, timedelta import operator import warnings import numpy as np from pandas._libs import NaT, algos, iNaT, lib from pandas._libs.tslibs.period import ( DIFFERENT_FREQ, IncompatibleFrequency, Period) from pandas._libs.tslibs.timedeltas import Timedelta, delta_to_...
bsd-3-clause
zhreshold/mxnet
python/mxnet/ndarray/numpy/_op.py
1
320283
# pylint: disable=C0302 # 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
srio/exex
exex.py
1
31257
import numpy """ exex : EXafs EXtraction python routines to extract the EXAFS signal ( chi(k) ) from the absorption spectrum ( mu(E) ) dependencies: numpy (matplotlib may be used for plotting, but not required) MODIFICATION HISTORY: 20141204 srio@esrf.eu, written """ __auth...
mit
robottwo/pyjstat
pyjstat/pyjstat.py
1
30046
# -*- coding: utf-8 -*- """pyjstat is a python module for JSON-stat formatted data manipulation. This module allows reading and writing JSON-stat [1]_ format with python, using data frame structures provided by the widely accepted pandas library [2]_. The JSON-stat format is a simple lightweight JSON format for data d...
apache-2.0
kyleabeauchamp/pymbar
examples/alchemical-free-energy/alchemical_analysis.py
1
54842
#!/bin/env python # Originally written by Michael Shirts as: # Example illustrating the use of MBAR for computing the hydration free energy of OPLS 3-methylindole # in TIP3P water through alchemical free energy simulations. # Adapted by P. Klimovich and D. Mobley, March 2011, to be slightly more general. # Additional...
lgpl-2.1
d33tah/pgcli
pgcli/packages/tabulate.py
1
38007
# -*- coding: utf-8 -*- """Pretty-print tabular data.""" from __future__ import print_function from __future__ import unicode_literals from collections import namedtuple from decimal import Decimal from platform import python_version_tuple from wcwidth import wcswidth import re if python_version_tuple()[0] < "3": ...
bsd-3-clause
NeuroML/pyNeuroML
pyneuroml/pynml.py
1
64862
#!/usr/bin/env python """ Python wrapper around jnml command. Also a number of helper functions for handling/generating/running LEMS/NeuroML2 files Thanks to Werner van Geit for an initial version of a python wrapper for jnml. """ from __future__ import absolute_import from __future__ import print_function from __f...
lgpl-3.0
chrsrds/scikit-learn
sklearn/model_selection/tests/test_search.py
1
68848
"""Test the search module""" from collections.abc import Iterable, Sized from io import StringIO from itertools import chain, product import pickle import sys from types import GeneratorType import re import numpy as np import scipy.sparse as sp import pytest from sklearn.utils.fixes import sp_version from sklearn.u...
bsd-3-clause
xhqu1981/pymatgen
pymatgen/phasediagram/plotter.py
2
30521
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ This module provides classes for plotting PhaseDiagram objects. """ from six.moves import zip __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 20...
mit
rfinn/LCS
python/LCSsimulate-infall-paper2.py
1
37814
#!/usr/bin/env python ''' GOAL: - test several models that describe how disks shrink and integrated SFR decreases as a result of outside-in quenching USAGE - from within ipython %run ~/Dropbox/pythonCode/LCSsimulate-infall.py t = run_sim(tmax=0,drdt_step=0.05,nrandom=1000) t = run_sim(tmax=1,drdt_step=0.05,nrandom...
gpl-3.0
thorwhalen/ut
dacc/mong/util.py
1
30043
__author__ = 'thor' import pymongo as mg from pymongo import MongoClient from pymongo.errors import CursorNotFound import os import re import pandas as pd from numpy import inf, random, int64, int32, ndarray, float64, float32 import subprocess from datetime import datetime from pymongo.collection import Collection fr...
mit
biocore/american-gut-web
amgut/lib/locale_data/english_gut.py
1
135828
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division from amgut.lib.config_manager import AMGUT_CONFIG # ----------------------------------------------------------------------------- # Copyright (c) 2014--, The American Gut Project Development Team. # # Distributed under the terms of the BSD 3...
bsd-3-clause
esdalmaijer/webcam-eyetracker
PyOpenCV/pygazetracker/generic.py
1
39634
# -*- coding: utf-8 -*- from __init__ import _message, _DEBUG, _DEBUGDIR, _EYECASCADE, _FACECASCADE import time from threading import Thread from multiprocessing import cpu_count, Event, Lock, Process, Queue import cv2 import numpy from scipy import ndimage # # # # # # DEBUG MODE # In DEBUG mode, create a Matplotli...
gpl-3.0
dmitriz/zipline
zipline/algorithm.py
1
53698
# # 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
mikehankey/fireball_camera
diff-stacks.py
1
50578
#!/usr/bin/python3 # next steps. save off a cache of the diffs,so we can save time on multiple re-runs. # do a crop cnt confirm. # script to make master stacks per night and hour from the 1 minute stacks from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figur...
gpl-3.0
NicoRahm/CGvsPhoto
CGvsPhoto/model.py
1
57552
""" The ``model`` module ====================== Contains the class Model which implements the core model for CG detection, training, testing and visualization functions. """ import os import time import random from . import image_loader as il import tensorflow as tf import matplotlib.pyplot as plt ...
mit
xuewei4d/scikit-learn
sklearn/linear_model/tests/test_coordinate_descent.py
4
46426
# Authors: Olivier Grisel <olivier.grisel@ensta.org> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD 3 clause import numpy as np import pytest from scipy import interpolate, sparse from copy import deepcopy import joblib from sklearn.base import is_classifier from sklearn.datasets import lo...
bsd-3-clause
abigailStev/stingray
stingray/lightcurve.py
1
47691
""" Definition of :class::class:`Lightcurve`. :class::class:`Lightcurve` is used to create light curves out of photon counting data or to save existing light curves in a class that's easy to use. """ from __future__ import division, print_function import logging import numpy as np import stingray.io as io import sting...
mit
pscholz/presto
lib/python/sifting.py
1
56126
#!/usr/bin/env python import sys import re import os import copy import warnings import numpy as Num import matplotlib import matplotlib.pyplot as plt from presto import candidate_sigma # Note: the following are global variables that can # (and should) be set in whatever module # imports this file. The ...
gpl-2.0
hoelsner/product-database
app/productdb/tests/test_productdb_excel_import.py
1
50968
""" Test suite for the productdb.excel_import module """ import os import pandas as pd import pytest import datetime from django.contrib.auth.models import User from app.productdb.excel_import import ProductsExcelImporter, InvalidImportFormatException, InvalidExcelFileFormat, \ ProductMigrationsExcelImporter from a...
mit
bensondaled/pyfluo
pyfluo/data.py
1
62157
import os, h5py, warnings, sys, re,json import numpy as np, pandas as pd import matplotlib.pyplot as pl from skimage.morphology import erosion, dilation from skimage.filters import gaussian from skimage.exposure import equalize_adapthist from scipy.ndimage import label from .movies import Movie, play_mov from .series ...
bsd-2-clause
biorack/metatlas
metatlas/datastructures/metatlas_dataset.py
1
37801
""" object oriented interface to metatlas_dataset """ import datetime import getpass import glob import logging import multiprocessing import numbers import os import shutil import sys import tarfile import humanize import pandas as pd import tqdm from metatlas.datastructures import metatlas_objects as metob from met...
bsd-3-clause
zlykan/my_test
my_1.py
1
38838
import pandas as pd import numpy as np import csv as csv #################### train_df df = pd.read_csv('train.csv', header=0) print ' ' print 'check "NaN" in each column' for i in range(df.shape[1]): t=len(df[df.iloc[:,i].isnull()] ...
gpl-3.0
tedmeeds/tcga_encoder
tcga_encoder/analyses/biclustering/models.py
1
101361
from bic_math import PitmanYor, LOG2PI, LogSum, LogRnd, Gammaln, slice_sample, LogPartition, LogSumWeave from matplotlib.mlab import find #from Graphviz.Dotty import * # from scipy import weave LOGMIN = -743.746924741 from numpy import * from pylab import hist, matshow, cm, hlines, legend,vlines, show, draw, axis, fi...
mit
3324fr/spinalcordtoolbox
scripts/msct_qc.py
1
31047
#!/usr/bin/env python ######################################################################################### # # Qc class implementation # # # --------------------------------------------------------------------------------------- # Copyright (c) 2015 Polytechnique Montreal <www.neuro.polymtl.ca> # Authors: Frederic...
mit
TESScience/SPyFFI
CCD.py
1
48799
"""Tools to generate simulated TESS images.""" import numpy as np import zachopy.utils import astropy.io.fits import scipy.ndimage.measurements import os import matplotlib.pylab as plt import matplotlib.gridspec as gridspec import Cosmics import Stamper import logging from settings import log_file_handler logger = log...
mit
CompPhysics/MachineLearning
doc/Programs/ProjectsData/pulsars (1).py
1
61275
# coding: utf-8 # # Machine Learning Project 2: Pulsar Classification via Machine Learning using the HTRU2 Dataset # # # **Hoa Dinh, Jose Pablo Linarés Fernández, and Benedict Castro**\ # Erasmus Mundus Joint Master Degree in Nuclear Physics\ # Université de Caen Normandie # # Date: **Feb 20, 2020** # ## <center>...
cc0-1.0
datapythonista/pandas
pandas/core/arrays/period.py
1
36687
from __future__ import annotations from datetime import timedelta import operator from typing import ( TYPE_CHECKING, Any, Callable, Sequence, ) import numpy as np from pandas._libs.arrays import NDArrayBacked from pandas._libs.tslibs import ( BaseOffset, NaT, NaTType, Timedelta, ...
bsd-3-clause
DOV-Vlaanderen/pydov
tests/test_util_location_gmlfilter.py
1
38193
"""Module grouping tests for the pydov.util.location.GmlFilter class.""" import pytest import platform import subprocess from owslib.etree import etree from owslib.fes import And, Or from pydov.util.location import (Box, Disjoint, GeometryFilter, GeopandasFilter, GmlFilter, Within, ...
mit
rvanharen/SitC
UHI_reference.py
1
32248
#!/usr/bin/env python2 ''' Description: Author: Ronald van Haren, NLeSC (r.vanharen@esciencecenter.nl) Created: - Last Modified: - License: Apache 2.0 Notes: - ''' import zipfile import csv import StringIO from combine_wunderground_data import fitem from numpy import vstack from numpy ...
apache-2.0
bdh1011/wau
venv/lib/python2.7/site-packages/pandas/tests/test_frame.py
1
580875
# -*- coding: utf-8 -*- from __future__ import print_function # pylint: disable-msg=W0612,E1101 from copy import deepcopy from datetime import datetime, timedelta, time import sys import operator import re import csv import nose import functools import itertools from itertools import product, permutations from distuti...
mit
kushalbhola/MyStuff
Practice/PythonApplication/env/Lib/site-packages/numpy/lib/function_base.py
1
156286
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 functools import re import sy...
apache-2.0
davidwaroquiers/pymatgen
pymatgen/analysis/phase_diagram.py
1
117885
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module defines tools to generate and analyze phase diagrams. """ import collections import itertools import json import logging import math import os import re from functools import lru_cache import ...
mit
mlperf/training_results_v0.5
v0.5.0/nvidia/submission/code/single_stage_detector/pytorch/utils.py
1
32153
# MIT License # # Copyright (c) 2018 kuangliu # # 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, modify, merge, pub...
apache-2.0
gammasky/cta-dc
sky_model_checks/source_distib_check.py
1
30557
""" Plot some simple source parameter distributions to illustrate / check the CTA 1DC GPS sky model. """ import logging from collections import OrderedDict import numpy as np from scipy.ndimage import gaussian_filter1d import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt from astropy.table import Ta...
bsd-3-clause
Laurae2/LightGBM
python-package/lightgbm/basic.py
1
77273
# coding: utf-8 # pylint: disable = invalid-name, C0111, C0301 # pylint: disable = R0912, R0913, R0914, W0105, W0201, W0212 """Wrapper c_api of LightGBM""" from __future__ import absolute_import import copy import ctypes import os import warnings from tempfile import NamedTemporaryFile import numpy as np import scipy...
mit
aflaxman/scikit-learn
sklearn/ensemble/gradient_boosting.py
2
81339
"""Gradient Boosted Regression Trees This module contains methods for fitting gradient boosted regression trees for both classification and regression. The module structure is the following: - The ``BaseGradientBoosting`` base class implements a common ``fit`` method for all the estimators in the module. Regressio...
bsd-3-clause
majetideepak/arrow
python/pyarrow/tests/test_convert_builtin.py
1
37623
# -*- 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
jonycgn/scipy
scipy/stats/morestats.py
1
82932
# Author: Travis Oliphant, 2002 # # Further updates and enhancements by many SciPy developers. # from __future__ import division, print_function, absolute_import import math import warnings from collections import namedtuple import numpy as np from numpy import (isscalar, r_, log, sum, around, unique, asarray, ...
bsd-3-clause
matmodlab/matmodlab2
matmodlab2/core/matmodlab.py
1
40637
from __future__ import print_function import os import time import numpy as np from copy import deepcopy as copy from collections import OrderedDict from .tensor import VOIGT, I9, inv, dot from .environ import environ from .tensor import array_rep, unrotate, rotate from .material import Material from .misc import is_s...
bsd-3-clause
evanbiederstedt/kplr
kplr/api.py
1
30897
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (division, print_function, absolute_import, unicode_literals) __all__ = ["API", "KOI", "Planet", "Star", "LightCurve", "TargetPixelFile"] import os import re import json import shutil import logging from itertools import pro...
mit
gfyoung/scipy
scipy/signal/fir_filter_design.py
3
41877
# -*- coding: utf-8 -*- """Functions for FIR filter design.""" from __future__ import division, print_function, absolute_import from math import ceil, log import warnings import numpy as np from numpy.fft import irfft, fft, ifft from scipy.special import sinc from scipy.linalg import toeplitz, hankel, pinv from scipy...
bsd-3-clause
dsm054/pandas
pandas/tests/io/json/test_pandas.py
1
50373
# -*- coding: utf-8 -*- # pylint: disable-msg=W0612,E1101 import pytest from pandas.compat import (range, lrange, StringIO, OrderedDict, is_platform_32bit) import os import numpy as np from pandas import (Series, DataFrame, DatetimeIndex, Timestamp, read_json, compat) from...
bsd-3-clause
cchwala/pySNMPdaq
pySNMPdaq.py
1
36578
# -*- coding: utf-8 -*- """ Created on Thu Feb 20 13:16:15 2014 @author: chwala-c """ import netsnmp import signal import logging import errno import shutil import os import gzip from os import getpid, makedirs, path from multiprocessing import Event, Process, Queue, Pool from datetime import datetime from time impo...
bsd-3-clause
seckcoder/lang-learn
python/sklearn/sklearn/linear_model/least_angle.py
1
43333
""" Least Angle Regression algorithm. See the documentation on the Generalized Linear Model for a complete discussion. """ # Author: Fabian Pedregosa <fabian.pedregosa@inria.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux # # License: BSD Style. from math import log import sys ...
unlicense
webmasterraj/GaSiProMo
flask/lib/python2.7/site-packages/pandas/tseries/tests/test_resample.py
2
62178
# pylint: disable=E1101 from datetime import datetime, timedelta from functools import partial from pandas.compat import range, lrange, zip, product import numpy as np from pandas import (Series, TimeSeries, DataFrame, Panel, Index, isnull, notnull, Timestamp) from pandas.tseries.index import da...
gpl-2.0
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/io/formats/format.py
1
90130
# -*- coding: utf-8 -*- """ Internal module for formatting output data in csv, html, and latex files. This module also applies to display formatting. """ from __future__ import print_function from distutils.version import LooseVersion # pylint: disable=W0141 from textwrap import dedent from pandas.core.dtypes.missin...
apache-2.0
liyu1990/sklearn
sklearn/linear_model/tests/test_logistic.py
3
39136
import numpy as np import scipy.sparse as sp from scipy import linalg, optimize, sparse import scipy from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_equal from...
bsd-3-clause
magic2du/contact_matrix
Contact_maps/mnist_psuedo_ipython_dl_ppi/code/DL_Stacked_Model_Mnist_Psuedo_05_20_2015.py
1
39571
# coding: utf-8 # In[1]: # this part imports libs and load data from csv file import sys sys.path.append('../../../libs/') import csv from dateutil import parser from datetime import timedelta from sklearn import svm import numpy as np #import pandas as pd import pickle from sklearn.cross_validation import train_tes...
gpl-2.0
jiangxb1987/spark
python/pyspark/ml/clustering.py
1
59016
# # 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
rustychris/stomel
src/paver.py
1
246155
import sys, os sys.path.append( os.path.join(os.environ['HOME'],'python')) from numpy import * from safe_pylab import * from matplotlib.collections import * from matplotlib.patches import Circle from collections import Iterable from shapely import geometry as geo from shapely import wkb from plot_wkb import * try: ...
gpl-2.0
zverevalexei/trex-http-proxy
trex_client/external_libs/scapy-2.3.1/python3/scapy/utils.py
1
31245
## 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 """ General utility functions. """ import os,sys,socket,types import random,time import gzip,zlib import re,struct,array...
mit
anugrah-saxena/pycroscopy
pycroscopy/processing/image_processing.py
1
53543
""" Created on Jun 16, 2016 @author: Chris Smith -- csmith55@utk.edu """ from __future__ import division, print_function, absolute_import import os from multiprocessing import cpu_count from warnings import warn import matplotlib.pyplot as plt import numpy as np from scipy.optimize import leastsq from scipy.signal im...
mit
kekraft/golden_eye
src/pong_system/scripts/pong_system.py
1
32887
#!/usr/bin/env python import roslib; roslib.load_manifest('pong_system') import rospy from cv_bridge import CvBridge, CvBridgeError import numpy as np import cv2 import time from matplotlib import pyplot as plt import copy import sys import time # from Tkinter import * import Tkinter as tk import Image as PilImage i...
bsd-2-clause
treycausey/scikit-learn
sklearn/linear_model/tests/test_sgd.py
1
30633
import pickle import unittest import numpy as np import scipy.sparse as sp 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.testing import assert_greater from sklearn.utils.testing ...
bsd-3-clause
cpcloud/seaborn
seaborn/linearmodels.py
1
59198
"""Plotting functions for linear models (broadly construed).""" from __future__ import division import copy import itertools import warnings import numpy as np import pandas as pd from scipy.spatial import distance import matplotlib as mpl import matplotlib.pyplot as plt try: import statsmodels.api as sm impor...
bsd-3-clause
schae234/cob
cob/server.py
1
33713
#!/usr/bin/python3 import re import os import copy import time import yaml import logging import numpy as np import pandas as pd import camoco as co import networkx as nx from math import isinf from itertools import chain from flask import Flask, url_for, jsonify, request, send_from_directory, abort print('Loading Ca...
mit
neherlab/treetime
treetime/wrappers.py
1
45306
from __future__ import print_function, division, absolute_import import os, shutil, sys import numpy as np import pandas as pd from textwrap import fill from Bio.SeqRecord import SeqRecord from Bio.Seq import Seq from Bio.Align import MultipleSeqAlignment from Bio import Phylo, AlignIO from Bio import __version__ as bi...
mit
yutiansut/QUANTAXIS
QUANTAXIS_Test/QAData_Test/data_fq_test.py
2
45432
import unittest import sys import os import struct import sqlite3 import pprint; import QUANTAXIS as QA import QUANTAXIS.QAUtil.QADate as QAUtilDate from QUANTAXIS.QASU.save_tushare import (QA_SU_save_stock_info_tushare ,QA_SU_save_stock_terminated) from QUANTAXIS.QAFetch.QAQuery import (QA_fetch_stock_basic_info_tu...
mit
Nikea/nsls2_gui
nsls2_gui/dpc_gui.py
1
38302
from __future__ import print_function import os import sys import multiprocessing as mp import time from PyQt4 import (QtCore, QtGui) from PyQt4.QtCore import Qt import matplotlib.cm as cm import Image import PIL import scipy from scipy.misc import imsave import numpy as np import matplotlib as mpl from matplotlib.ba...
bsd-3-clause
13anjou/Research-Internship
Analysis/dico.py
1
31976
#!/usr/bin/env python #-*- coding: utf-8 -*- import csv from pylab import* from scipy import stats import numpy import math import matplotlib.pyplot as plt import numbers from regression import correl from allTest import k, s def main() : dicoEchant = corres() dicoTotal = dict() #On va importer toutes les donn...
gpl-2.0
AutonomyLab/deep_intent
code/autoencoder_model/scripts/thesis_scripts/baseline_classifier.py
1
46812
from __future__ import absolute_import from __future__ import division from __future__ import print_function from matplotlib.pyplot import axes import hickle as hkl import numpy as np np.random.seed(2 ** 10) import tensorflow as tf from keras import backend as K K.set_image_dim_ordering('tf') from keras import regul...
bsd-3-clause
zasdfgbnm/tensorflow
tensorflow/contrib/losses/python/metric_learning/metric_loss_ops.py
1
40521
# Copyright 2017 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
yaukwankiu/armor
analysis.py
1
34740
# armor/analysis.py # # the basic entry point / user front module of the package armor # 16-3-2013 """ == USE == e.g. for installation on usb drive "KINGSTON": cd /media/KINGSTON/ARMOR/2013/python python from armor import pattern from armor import analysis dbz = pattern.DBZ a = dbz('20120612.0200') b = dbz('2012061...
cc0-1.0
UDST/pandana
pandana/network.py
1
31374
from __future__ import division, print_function import numpy as np import pandas as pd from sklearn.neighbors import KDTree from .cyaccess import cyaccess from .loaders import pandash5 as ph5 import warnings def reserve_num_graphs(num): """ This function was previously used to reserve memory space for multi...
agpl-3.0
clslabMSU/clustGUI
gui.py
1
39396
import sys from PyQt5 import QtWidgets, QtCore from PyQt5.QtWidgets import QMainWindow , QTableWidgetItem, QAction, QApplication, QMdiArea,QListWidgetItem, QListWidget, QPushButton, QHBoxLayout, QVBoxLayout, QWidget, QTableWidget,QCheckBox,QLineEdit from PyQt5.QtGui import QIcon import numpy as np import csv f...
apache-2.0
crpurcell/friendlyVRI
Imports/util_tk.py
1
39238
#!/usr/bin/env python #=============================================================================# # # # NAME: util_tk.py # # ...
mit
MJuddBooth/pandas
pandas/tests/sparse/frame/test_frame.py
1
55837
# pylint: disable-msg=E1101,W0612 import operator import numpy as np from numpy import nan import pytest from pandas._libs.sparse import BlockIndex, IntIndex from pandas.compat import PY2, lrange from pandas.errors import PerformanceWarning import pandas as pd from pandas import DataFrame, Panel, Series, bdate_rang...
bsd-3-clause