repo_name
string
path
string
copies
string
size
string
content
string
license
string
celiafish/VisTrails
vistrails/packages/matplotlib/artists.py
2
230215
from vistrails.core.modules.vistrails_module import Module from bases import MplProperties import matplotlib.artist import matplotlib.cbook def translate_color(c): return c.tuple def translate_MplLine2DProperties_marker(val): translate_dict = {'caretright': 5, 'star': '*', 'point': '.', 'mathtext': '$......
bsd-3-clause
zohannn/motion_manager
scripts/old/task_1_reaching/var_0/predicting_task_1_var_0_20k.py
1
136430
#!/usr/bin/env python3 import sys import pandas as pd from sklearn import decomposition from sklearn import metrics from sklearn.externals import joblib import matplotlib.pyplot as plt import tensorflow as tf import numpy as np import math from random import randint # HUPL from HUPL.learner import preprocess_featur...
mit
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/python/lib/python3.3/site-packages/numpy/lib/npyio.py
1
65349
__all__ = ['savetxt', 'loadtxt', 'genfromtxt', 'ndfromtxt', 'mafromtxt', 'recfromtxt', 'recfromcsv', 'load', 'loads', 'save', 'savez', 'savez_compressed', 'packbits', 'unpackbits', 'fromregex', 'DataSource'] import numpy as np from . import format import sys import os import re import sys import ...
gpl-3.0
xuewei4d/scikit-learn
sklearn/linear_model/tests/test_ridge.py
4
49798
import numpy as np import scipy.sparse as sp from scipy import linalg from itertools import product import pytest from sklearn.utils._testing import assert_almost_equal from sklearn.utils._testing import assert_allclose from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import as...
bsd-3-clause
czhengsci/pymatgen
pymatgen/io/lammps/data.py
2
45838
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, print_function, unicode_literals, \ absolute_import from collections import OrderedDict from io import StringIO import itertools import re import warnings import numpy as ...
mit
thekerrlab/netpyne
netpyne/metadata/metadata.py
1
131863
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() metadata = { # ------------------------------------------------------------------------------------...
mit
eickenberg/scikit-learn
sklearn/feature_extraction/text.py
1
49422
# -*- coding: utf-8 -*- # Authors: Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Lars Buitinck <L.J.Buitinck@uva.nl> # Robert Layton <robertlayton@gmail.com> # Jochen Wersdörfer <jochen@wersdoerfer.de> # Roman Sinayev <roman.sinayev@gma...
bsd-3-clause
bert9bert/statsmodels
statsmodels/tsa/stattools.py
2
44980
""" Statistical tools for time series analysis """ from statsmodels.compat.python import (iteritems, range, lrange, string_types, lzip, zip, long) from statsmodels.compat.scipy import _next_regular import numpy as np from numpy.linalg import LinAlgError from scipy import stats f...
bsd-3-clause
Gaia3D/GeepsSpatialStatistic
Widget_MoransI.py
1
36993
# -*- coding: utf-8 -*- from PyQt4.QtCore import * from PyQt4.QtGui import * import os from pysal import W, Moran, Moran_Local import numpy as np from qgis.core import * from Utility import * from gui.ui_form_morans_i import Ui_Form_Parameter as Ui_Form import matplotlib.pyplot as plt from xlwt import Workbook class ...
apache-2.0
drykunov/MEGT
evgt.py
1
40120
# To-do # Write an evolutionary optimization algorithm # Write a multi-modal optimization # [done] Develop easy to follow outputs # Add multi-thread workflows (use SCOOP) # Add docstrings import numpy as np import warnings import math import copy import textwrap from collections import OrderedDict import logging from...
gpl-3.0
bulik/ldsc
munge_sumstats.py
1
30281
#!/usr/bin/env python from __future__ import division import pandas as pd import numpy as np import os import sys import traceback import gzip import bz2 import argparse from scipy.stats import chi2 from ldscore import sumstats from ldsc import MASTHEAD, Logger, sec_to_str import time np.seterr(invalid='ignore') try: ...
gpl-3.0
atmtools/typhon
typhon/plots/cm/_cmocean.py
1
87751
# -*- coding: utf-8 -*- """ It is a subset of the cmocean package [0] provided by Kristen M. Thyng. The MIT License (MIT) Copyright (c) 2015 Kristen M. Thyng 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 t...
mit
ahaldane/numpy
numpy/lib/recfunctions.py
1
55570
""" Collection of utilities to manipulate structured arrays. Most of these functions were initially implemented by John Hunter for matplotlib. They have been rewritten and extended for convenience. """ from __future__ import division, absolute_import, print_function import sys import itertools import numpy as np im...
bsd-3-clause
Winterflower/mdf
mdf/nodes.py
1
70372
import uuid import itertools import logging import inspect import time import sys import cython import copy import types import os import re from .parser import tokenize, get_assigned_node_name from context import MDFContext, MDFNodeBase from common import DIRTY_FLAGS # these are cimported in nodes.pxd # uncomment if ...
mit
kyleabeauchamp/mdtraj
mdtraj/core/topology.py
1
41793
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2014 Stanford University and the Authors # # Authors: Peter Eastman, Robert McGibbon # Contributors: Kyle A. Beaucha...
lgpl-2.1
MTgeophysics/mtpy
mtpy/modeling/modem/plot_response.py
1
123379
""" ================== ModEM ================== # Generate files for ModEM # revised by JP 2017 # revised by AK 2017 to bring across functionality from ak branch """ import numpy as np import os from matplotlib import pyplot as plt, gridspec as gridspec from matplotlib.ticker import MultipleLocator from matplotlib....
gpl-3.0
Andreea-G/Codds_DarkMatter
src/runprogram.py
1
32949
""" Copyright (c) 2015 Andreea Georgescu Created on Sat Dec 6 15:32:34 2014 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. ...
gpl-2.0
merenlab/anvio
anvio/drivers/vmatch.py
1
67296
# coding utf-8 """An interface for Vmatch""" import os import time import queue import shutil import pandas as pd import multiprocessing as mp from collections import defaultdict import anvio import anvio.utils as utils import anvio.terminal as terminal import anvio.filesnpaths as filesnpaths from anvio.errors impo...
gpl-3.0
jchodera/yank
Yank/utils.py
1
52560
import os import re import sys import copy import glob import json import shutil import signal import pandas import inspect import logging import itertools import subprocess import collections from contextlib import contextmanager from pkg_resources import resource_filename import mdtraj import parmed import numpy as...
lgpl-3.0
cdiazbas/hazel
pyGUI/hazel.py
2
59266
import sys, os, random import numpy as np import i0Allen from PyQt4.QtCore import * from PyQt4.QtGui import * import pyhazel from ipdb import set_trace as stop import pickle import os.path import matplotlib.pyplot as pl from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.fi...
mit
ud3sh/coursework
deeplearning.ai/coursera-improving-neural-networks/week3/TensorFlow_Tutorial_v3b.py
1
39226
# coding: utf-8 # # TensorFlow Tutorial # # Welcome to this week's programming assignment. Until now, you've always used numpy to build neural networks. Now we will step you through a deep learning framework that will allow you to build neural networks more easily. Machine learning frameworks like TensorFlow, Paddle...
unlicense
luwei0917/awsemmd_script
msa_compute_phis_specific_decoys.py
1
46791
import os import sys import numpy as np import pandas as pd from Bio.PDB.Polypeptide import three_to_index from Bio.PDB.Polypeptide import one_to_three from Bio.PDB.Polypeptide import three_to_one import random import argparse from functools import partial import time # res to index # index_dic parameter_folder = "/Use...
mit
zfrenchee/pandas
pandas/tests/frame/test_constructors.py
1
79109
# -*- coding: utf-8 -*- from __future__ import print_function from datetime import datetime, timedelta import functools import itertools import pytest from numpy.random import randn import numpy as np import numpy.ma as ma import numpy.ma.mrecords as mrecords from pandas.core.dtypes.common import is_integer_dtype ...
bsd-3-clause
jwdegee/2017_eLife
1_individuals.py
1
243489
#!/usr/bin/env python # encoding: utf-8 """ ================================================ Created by Jan Willem de Gee on 2014-06-01. Copyright (c) 2009 jwdegee. All rights reserved. ================================================ """ import os, sys, datetime import subprocess, logging import scipy as sp import sc...
mit
jmball/Automated_PV_Measurement
Python/Data_analysis_and_report_generation_old.py
1
56060
# This script takes the measurement log files and loads them as Pandas # DataFrames for manipulation and then plotting. import argparse import itertools import os from datetime import date, timedelta from functools import reduce import matplotlib.dates as mdates import matplotlib.pyplot as plt import numpy as np impo...
mit
huggingface/transformers
templates/adding_a_new_example_script/{{cookiecutter.directory_name}}/run_{{cookiecutter.example_shortcut}}.py
1
36927
#!/usr/bin/env python # coding=utf-8 # Copyright {{cookiecutter.authors}} and The HuggingFace Inc. team. 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://ww...
apache-2.0
oduwa/Pic-Numero
PicNumero/tqdm/_tqdm.py
2
31598
""" Customisable progressbar decorator for iterators. Includes a default (x)range iterator printing to stderr. Usage: >>> from tqdm import trange[, tqdm] >>> for i in trange(10): #same as: for i in tqdm(xrange(10)) ... ... """ # future division is important to divide integers and get as # a result precise fl...
mit
winklerand/pandas
pandas/tests/indexes/period/test_ops.py
1
37473
import pytest import numpy as np import pandas as pd import pandas._libs.tslib as tslib import pandas.util.testing as tm import pandas.core.indexes.period as period from pandas import (DatetimeIndex, PeriodIndex, period_range, Series, Period, _np_version_under1p10, Index) from pandas.tests.test_b...
bsd-3-clause
bxlab/HiFive_Paper
Scripts/HiCLib/mirnylab-hiclib-460c3fbc0f72/build/lib/hiclib/fragmentHiC.py
2
93010
# (c) 2012 Massachusetts Institute of Technology. All Rights Reserved # Code written by: Maksim Imakaev (imakaev@mit.edu) """ This is a module class for fragment-level Hi-C data analysis. The base class "HiCdataset" can load, save and merge Hi-C datasets, perform certain filters, and save binned heatmaps. Additional c...
bsd-3-clause
alexhege/Orbital-APSYNSIM
APSYNSIM_v1.3/SCRIPT/relicAPSYNSIM_old.py
1
108142
############################################################################# # # APSYNSIM: A real-time Aperture Synthesis Simulator # # Copyright (C) 2014 Ivan Marti-Vidal (Nordic ARC Node, OSO, Sweden) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
gpl-3.0
davidsoncolin/IMS
Ops/Mesh.py
1
33815
import Op, Interface import IO import numpy as np import time from IO import MAReader import pyopencl as cl from GCore import Character from GCore import SolveIK class MarkerMesh(Op.Op): def __init__(self, name='/Marker_Mesh', locations='', filename='', texture='', drawStyle='wire_over_smooth', colour='(1.0, 1.0, 0...
mit
jmfranck/pyspecdata
pyspecdata/figlist.py
1
34370
"""Contains the figure list class The figure list gives us three things: * Automatically handle the display and scaling of nddata units. * Refer to plots by name, rather than number (matplotlib has a mechanism for this, which we ignore) * A "basename" allowing us to generate multiple sets of plots for different...
bsd-3-clause
lcharleux/abapy
abapy/postproc.py
1
108824
''' Post Processing =============== ''' def GetMesh(odb,instance,dti='I'): '''Retrieves mesh on an instance in an Abaqus Output Database. :param odb: output database :type odb: odb object :param instance: instance name declared in the Abaqus inp file. :type instance: string :param dti: int data type...
gpl-2.0
plotly/plotly.py
packages/python/plotly/plotly/graph_objs/streamtube/_colorbar.py
1
73319
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "streamtube" _path_str = "streamtube.colorbar" _valid_props = { "bgcolor", ...
mit
Erotemic/ibeis
ibeis/algo/graph/demo.py
1
31743
# -*- coding: utf-8 -*- """ TODO: separate out the tests and make this file just generate the demo data """ from __future__ import absolute_import, division, print_function, unicode_literals import itertools as it import numpy as np import utool as ut from ibeis.algo.graph.state import POSTV, NEGTV, INCMP, UNREV from i...
apache-2.0
qrsforever/workspace
python/learn/thinkbayes/thinkstats2.py
1
70069
#!/usr/bin/python3 # -*- coding: utf-8 -*- """This file contains code for use with "Think Stats" and "Think Bayes", both by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division """...
mit
MJuddBooth/pandas
pandas/tests/frame/test_indexing.py
1
132839
# -*- coding: utf-8 -*- from __future__ import print_function from datetime import date, datetime, time, timedelta from warnings import catch_warnings, simplefilter import numpy as np import pytest from pandas._libs.tslib import iNaT from pandas.compat import PY2, long, lrange, lzip, map, range, zip from pandas.co...
bsd-3-clause
basnijholt/holoviews
holoviews/element/graphs.py
1
32076
from types import FunctionType from collections import defaultdict import param import numpy as np from ..core import Dimension, Dataset, Element2D from ..core.accessors import Redim from ..core.util import max_range, search_indices from ..core.operation import Operation from .chart import Points from .path import Pa...
bsd-3-clause
kastnerkyle/speech_density
midify.py
1
32006
# License: BSD 3-clause # Authors: Kyle Kastner, # Pierre Luc Carrier import numpy as np import scipy from numpy.lib.stride_tricks import as_strided import scipy.signal as sg from scipy import linalg, fftpack def mel_to_hz(mels, htk=False): """Convert mel bin numbers to frequencies :usage: ...
bsd-3-clause
MDAnalysis/mdanalysis
package/MDAnalysis/analysis/legacy/x3dna.py
1
35151
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- https://www.mdanalysis.org # Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # # Released under t...
gpl-2.0
gfyoung/pandas
pandas/tests/scalar/timedelta/test_arithmetic.py
1
33777
""" Tests for scalar Timedelta arithmetic ops """ from datetime import datetime, timedelta import operator import numpy as np import pytest from pandas.compat import is_numpy_dev import pandas as pd from pandas import NaT, Timedelta, Timestamp, compat, offsets import pandas._testing as tm from pandas.core import ops...
bsd-3-clause
geophysics/mtpy
mtpy/imaging/plotpseudosection.py
1
48915
# -*- coding: utf-8 -*- """ Created on Thu May 30 18:39:58 2013 @author: jpeacock-pr """ #============================================================================== import matplotlib.pyplot as plt import numpy as np import os import matplotlib.colorbar as mcb import matplotlib.colors as colors import mtpy.imagin...
gpl-3.0
freeman-lab/dask
dask/bag/core.py
1
37159
from __future__ import absolute_import, division, print_function import itertools import math import tempfile import inspect import gzip import zlib import bz2 import os from fnmatch import fnmatchcase from glob import glob from collections import Iterable, Iterator, defaultdict from functools import wraps, partial ...
bsd-3-clause
abonaca/stream_information
scripts/stream_info/streams.py
1
48705
from __future__ import division, print_function import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import astropy import astropy.units as u from astropy.constants import G from astropy.table import Table import astropy.coordinates as coord import gala.coordinates as gc #from stream_info impo...
mit
rs2/pandas
pandas/tests/test_strings.py
1
133766
from datetime import datetime, timedelta import re import numpy as np from numpy.random import randint import pytest from pandas._libs import lib import pandas as pd from pandas import DataFrame, Index, MultiIndex, Series, concat, isna, notna import pandas._testing as tm import pandas.core.strings as strings def a...
bsd-3-clause
jmmauricio/pypstools
pypstools/tools.py
1
40432
""" 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
laurentperrinet/elasticite
elasticite/elasticite.py
1
36665
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import os import numpy as np import time try: #import matplotlib #matplotlib.use("Agg") # agg-backend, so we can create figures without x-server (no PDF, just PNG etc.) import matplotlib.pyplot as plt exce...
mit
jmmease/pandas
pandas/core/frame.py
1
236565
""" DataFrame --------- An efficient 2D container for potentially mixed-type time series or other labeled data series. Similar to its R counterpart, data.frame, except providing automatic data alignment and a host of useful data manipulation methods having to do with the labeling information """ from __future__ import...
bsd-3-clause
datasnakes/Datasnakes-Scripts
OrthoEvol/Orthologs/Blast/comparative_genetics.py
1
30749
"""Comparative Genetics""" # Standard Library import os import shutil import time import copy import random import pkg_resources from pathlib import Path # OrthoEvol from OrthoEvol.Manager.config import data from OrthoEvol.Manager.management import ProjectManagement from OrthoEvol.utilities import FullUtilities from Or...
mit
jskDr/jamespy_py3
kgrid_r0.py
1
40662
""" grid search codes for machine learning Chemistry toolbox such as RDKit is not used. """ from sklearn import model_selection, linear_model, svm, metrics import numpy as np import pandas as pd from operator import itemgetter import jutil from jsklearn import binary_model def gs_np(X, Y, alphas_log=(-3, 3, 7), met...
mit
ganong123/HARK
ConsumptionSaving/ConsAggShockModel_gn.py
1
33016
''' Consumption-saving models with aggregate productivity shocks as well as idiosyn- cratic income shocks. Currently only contains one microeconomic model with a basic solver. Also includes a subclass of Market called CobbDouglas economy, used for solving "macroeconomic" models with aggregate shocks. ''' #import os #...
apache-2.0
jminardi/mecode
mecode/main.py
1
40261
""" Mecode ====== ### GCode for all Mecode is designed to simplify GCode generation. It is not a slicer, thus it can not convert CAD models to 3D printer ready code. It simply provides a convenient, human-readable layer just above GCode. If you often find yourself manually writing your own GCode, then mecode is for y...
mit
chrsrds/scikit-learn
sklearn/feature_extraction/tests/test_text.py
1
44620
# -*- coding: utf-8 -*- from collections.abc import Mapping import re import warnings import pytest from scipy import sparse from sklearn.feature_extraction.text import strip_tags from sklearn.feature_extraction.text import strip_accents_unicode from sklearn.feature_extraction.text import strip_accents_ascii from sk...
bsd-3-clause
CDSFinance/zipline
theano_rnn/rnn_minibatch.py
1
39671
""" Vanilla RNN Parallelizes scan over sequences by using mini-batches. @author Graham Taylor """ import numpy as np import theano import theano.tensor as T from sklearn.base import BaseEstimator import logging import time import os import datetime import cPickle as pickle logger = logging.getLogger(__name__) import ...
apache-2.0
buguen/pylayers
pylayers/gui/editor.py
1
51168
# -*- coding: utf-8 -*- import sys, os, random if 'QT_API' in os.environ: if os.environ['QT_API'] != 'pyqt': saveQTAPI = os.environ['QT_API'] os.environ['QT_API'] = 'pyqt' else: saveQTAPI = '' os.environ['QT_API'] = 'pyqt' try: from mayavi.sources.vtk_data_source import VTKDataSource ...
lgpl-3.0
waterponey/scikit-learn
sklearn/cluster/k_means_.py
2
59590
"""K-means clustering""" # Authors: Gael Varoquaux <gael.varoquaux@normalesup.org> # Thomas Rueckstiess <ruecksti@in.tum.de> # James Bergstra <james.bergstra@umontreal.ca> # Jan Schlueter <scikit-learn@jan-schlueter.de> # Nelle Varoquaux # Peter Prettenhofer <peter.prettenh...
bsd-3-clause
lsst-dm/great3-public
metrics/evaluate.py
2
61024
# Copyright (c) 2014, the GREAT3 executive committee (http://www.great3challenge.info/?q=contacts) # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted # provided that the following conditions are met: # # 1. Redistributions of source code must retain...
bsd-3-clause
liangfok/controlit_demos
dreamer_controlit_demos/nodes/Demo11_Microwave.py
1
32104
#!/usr/bin/env python ''' This uses 5-DOF end effector control to grab a cup out of a microwave oven. ''' import sys, getopt # for getting and parsing command line arguments import time import math import threading import rospy import smach import smach_ros from std_msgs.msg import Float64, Float64MultiArray, Mu...
lgpl-2.1
mmalter/dlstats
dlstats/tests/fetchers/test_esri.py
1
63129
# -*- coding: utf-8 -*- """ Created on Thu Nov 26 10:20:04 2015 @author: salimeh """ """ Created on Thu Nov 26 10:20:04 2015 @author: salimeh """ import io import tempfile import datetime import os import pandas from pprint import pprint from urllib.parse import urlparse, urljoin from urllib.request import url2pathn...
agpl-3.0
ThomasBrouwer/BNMTF
experiments/experiments_toy/convergence/nmtf_icm.py
1
62712
""" Recover the toy dataset using ICM. We can plot the MSE, R2 and Rp as it converges, on the entire dataset. We have I=100, J=80, K=5, L=5, and no test data. We give flatter priors (1/10) than what was used to generate the data (1). """ import sys, os project_location = os.path.dirname(__file__)+"/../../../../" sys...
apache-2.0
jimmycallin/master-thesis
architectures/conll16st-hd-sdp/sup_parser_v4_hierarchy_cnn.py
1
44144
#!/usr/bin/env python # -*- coding: utf-8 -*- """Sample Discourse Relation Classifier Train Train parser for suplementary evaluation Train should take three arguments $inputDataset = the folder of the dataset to parse. The folder structure is the same as in the tar file $inputDataset/parses.json $inputDataset...
mit
weiHelloWorld/accelerated_sampling_with_autoencoder
MD_simulation_on_alanine_dipeptide/current_work/tests/ANN_simulation_test.py
1
34218
'''This is a test for functionality of ANN_simulation.py ''' import sys, os, math, subprocess, matplotlib from functools import reduce matplotlib.use('agg') sys.path.append('../src/') # add the source file folder from ANN_simulation import * from numpy.testing import assert_almost_equal, assert_equal class test_S...
mit
eqcorrscan/EQcorrscan
eqcorrscan/utils/plotting.py
1
94525
""" Utility code for most of the plots used as part of the EQcorrscan package. :copyright: EQcorrscan developers. :license: GNU Lesser General Public License, Version 3 (https://www.gnu.org/copyleft/lesser.html) """ import numpy as np import logging import datetime as dt import copy import os import matp...
gpl-3.0
iled/gsimcli
GSIMCLI/interface/gui.py
1
76499
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on 16/06/2014 @author: julio """ from PySide import QtCore, QtGui # , QtUiTools from functools import partial import glob from multiprocessing import cpu_count import os import sys from tempfile import NamedTemporaryFile import time import warnings base = os...
gpl-3.0
xhochy/arrow
python/pyarrow/tests/test_convert_builtin.py
1
66543
# 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
lfairchild/PmagPy
dialogs/thellier_gui_dialogs.py
2
80057
#!/usr/bin/env python #========================================================================= # LOG HEADER: # # Dialogs boxes for thellier_gui.py # #========================================================================= # # 11/16/2014 add some units to criteria dialogs # # 11/08/2014 Version add k_prime descrip...
bsd-3-clause
RJT1990/pyflux
pyflux/gas/gasx.py
1
41755
import sys if sys.version_info < (3,): range = xrange import numpy as np import pandas as pd import scipy.stats as ss import scipy.special as sp from patsy import dmatrices, dmatrix, demo_data from .. import families as fam from .. import tsm as tsm from .. import data_check as dc from .gas_core_recursions impor...
bsd-3-clause
rbalda/neural_ocr
env/lib/python2.7/site-packages/matplotlib/tests/test_mlab.py
3
119377
from __future__ import (absolute_import, division, print_function, unicode_literals) from matplotlib.externals import six import tempfile from numpy.testing import assert_allclose, assert_array_equal import numpy.ma.testutils as matest import numpy as np from nose.tools import (assert_equal, ...
mit
gamaanderson/artview
artview/components/plot_grid_legacy.py
1
42279
""" plot_grid.py Class instance used to make Display. """ # Load the needed packages import numpy as np import os import pyart from matplotlib.backends.qt_compat import is_pyqt5 if is_pyqt5(): from matplotlib.backends.backend_qt5agg import ( FigureCanvas, NavigationToolbar2QT as NavigationToolbar) else: ...
bsd-3-clause
GaloMALDONADO/motorg
motorog/dynTasks3.py
1
60626
import pinocchio as se3 import numpy as np import paths as lp import robot_config as rconf import mocap_config as mconf from hqp.wrapper import Wrapper from trajectory_extractor import References import ucm import plot_tools import csv import indexes import plotTasks from hqp.viewer_utils import Viewer import matplo...
gpl-3.0
alexandrudaia/gplearn
gplearn/genetic.py
2
64518
"""Genetic Programming in Python, with a scikit-learn inspired API The :mod:`sklearn.genetic` module implements Genetic Programming. These are supervised learning methods based on applying evolutionary operations on computer programs. """ # Author: Trevor Stephens <trevorstephens.com> # # License: BSD 3 clause impor...
bsd-3-clause
grlee77/numpy
numpy/lib/npyio.py
1
89541
import sys import os import re import functools import itertools import warnings import weakref import contextlib from operator import itemgetter, index as opindex from collections.abc import Mapping import numpy as np from . import format from ._datasource import DataSource from numpy.core import overrides from numpy...
bsd-3-clause
par2/lamana
lamana/utils/tools.py
1
46842
#------------------------------------------------------------------------------ '''Handy tools for global use. - build cases quickly - read geo_strings from DataFrames - write/read csv files to DataFrames - compare sets - resequence columns in DataFrame - determine if brackets/parentheses match in a string - assert pa...
bsd-3-clause
achesak/weatherlog
resources/dialogs/info_dialog.py
1
38166
# -*- coding: utf-8 -*- ################################################################################ # # WeatherLog: dialogs/info_dialog.py # This dialog shows the dataset info. # ################################################################################ # Import GTK for the dialog. from gi.repository imp...
gpl-3.0
nisse3000/pymatgen
pymatgen/analysis/defects/point_defects.py
1
90658
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ This module defines classes for point defects. """ __author__ = "Bharat Medasani, Nils E. R. Zimmermann" __copyright__ = "Copyright 2011, The Materials Pr...
mit
probprog/pyprob
pyprob/diagnostics.py
1
53092
import torch import os from collections import OrderedDict, defaultdict import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import time import sys import csv from torch.distributions.kl import kl_divergence from . import __version__, util from .distributions import Empirical from .graph import ...
bsd-2-clause
johnson1228/pymatgen
pymatgen/io/abinit/flows.py
1
109644
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ A Flow is a container for Works, and works consist of tasks. Flows are the final objects that can be dumped directly to a pickle file on disk Flows are executed using abirun (abipy). """ from __future__ impo...
mit
sonnyhu/scikit-learn
sklearn/mixture/tests/test_gaussian_mixture.py
1
37240
# Author: Wei Xue <xuewei4d@gmail.com> # Thierry Guillemot <thierry.guillemot.work@gmail.com> # License: BSD 3 clauseimport warnings import sys import warnings import numpy as np from scipy import stats, linalg from sklearn.covariance import EmpiricalCovariance from sklearn.datasets.samples_generator import...
bsd-3-clause
Eric89GXL/scipy
tools/refguide_check.py
4
31290
#!/usr/bin/env python """ refguide_check.py [OPTIONS] [-- ARGS] Check for a Scipy submodule whether the objects in its __all__ dict correspond to the objects included in the reference guide. Example of usage:: $ python refguide_check.py optimize Note that this is a helper script to be able to check if things ar...
bsd-3-clause
ccp137/DynamicViz
plot_cross_sections_between_two_points_as_html.py
1
39620
# -*- coding: utf-8 -*- # Cross-Section Interactive Viewer # # by Chengping Chai, University of Tennessee, October 4, 2017 # # Version 1.4 # # Updates: # V1.0, Chengping Chai, University of Tennessee, October 4, 2017 # V1.1, Chengping Chai, University of Tennessee, October 4, 2017 # some changes f...
gpl-3.0
pjryan126/solid-start-careers
store/api/zillow/venv/lib/python2.7/site-packages/pandas/tseries/tests/test_timezones.py
1
52203
# pylint: disable-msg=E1101,W0612 from datetime import datetime, timedelta, tzinfo, date import nose import numpy as np import pytz from pandas import (Index, Series, DataFrame, isnull, Timestamp) from pandas import DatetimeIndex, to_datetime, NaT from pandas import tslib import pandas.core.datetools as datetools i...
gpl-2.0
bdh1011/wau
venv/lib/python2.7/site-packages/pandas/computation/tests/test_eval.py
1
61792
#!/usr/bin/env python import warnings import operator from itertools import product from distutils.version import LooseVersion import nose from nose.tools import assert_raises from numpy.random import randn, rand, randint import numpy as np from numpy.testing import assert_array_equal, assert_allclose from numpy.tes...
mit
lixun910/pysal
pysal/explore/esda/moran.py
1
56841
""" Moran's I Spatial Autocorrelation Statistics """ __author__ = "Sergio J. Rey <srey@asu.edu>, \ Dani Arribas-Bel <daniel.arribas.bel@gmail.com>" from pysal.lib.weights.spatial_lag import lag_spatial as slag from .smoothing import assuncao_rate from .tabular import _univariate_handler, _bivariate_handler imp...
bsd-3-clause
googleapis/python-bigquery
google/cloud/bigquery/client.py
1
150658
# Copyright 2015 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
ebmdatalab/openprescribing
openprescribing/frontend/views/bookmark_utils.py
1
33726
# -*- coding: utf-8 -*- from datetime import date from tempfile import NamedTemporaryFile import html.parser import logging import os import re import subprocess import urllib.parse from anymail.message import attach_inline_image_file from dateutil.relativedelta import relativedelta from premailer import Premailer imp...
mit
karllessard/tensorflow
tensorflow/tools/compatibility/renames_v2.py
1
60522
# Copyright 2018 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
cbertinato/pandas
pandas/tests/io/test_stata.py
1
70474
from collections import OrderedDict import datetime as dt from datetime import datetime import gzip import io import os import struct import warnings import numpy as np import pytest from pandas.core.dtypes.common import is_categorical_dtype import pandas as pd from pandas.core.frame import DataFrame, Series import ...
bsd-3-clause
eig-2017/the-magical-csv-merge-machine
merge_machine/api.py
1
53356
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 6 15:01:16 2017 @author: leo TODO: - Safe file name / not unique per date - API: List of finished modules for given project / source - API: List of loaded sources - API: Fetch logs - API: Move implicit load out of API...
mit
kklmn/xrt
examples/withRaycing/14_SoftiMAX/Softi_CXIw1D.py
1
37180
# -*- coding: utf-8 -*- """ !!! select one of the four functions to run at the very bottom !!! !!! select 'rays', 'hybrid' or 'wave' below !!! !!! select a desired cut and emittance below !!! Described in the __init__ file. """ __author__ = "Konstantin Klementiev", "Roman Chernikov" __date__ = "07 Feb 2018" import os...
mit
phobson/statsmodels
statsmodels/tsa/tests/test_arima.py
1
89591
import warnings from statsmodels.compat.python import lrange, BytesIO import numpy as np from nose.tools import nottest from numpy.testing import (assert_almost_equal, assert_, assert_allclose, assert_raises, dec, TestCase) from statsmodels.tools.testing import assert_equal import statsmodel...
bsd-3-clause
seancug/python-example
fatiando-0.2/fatiando/mesher.py
1
47712
""" Generate and operate on various kinds of meshes and geometric elements **Geometric elements** * :class:`~fatiando.mesher.Polygon` * :class:`~fatiando.mesher.Square` * :class:`~fatiando.mesher.Prism` * :class:`~fatiando.mesher.PolygonalPrism` * :class:`~fatiando.mesher.Sphere` * :class:`~fatiando.mesher.Tesseroid`...
gpl-2.0
antiface/mne-python
mne/io/fiff/tests/test_raw.py
2
42811
from __future__ import print_function # Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import os import os.path as op import glob from copy import deepcopy import warnings import itertools as itt import numpy as np ...
bsd-3-clause
thaihungle/deepexp
deep-process/busi_task/presuf_train.py
1
177089
import warnings warnings.filterwarnings('ignore') import tensorflow as tf import numpy as np import pickle import getopt import time import sys import os import pandas import nltk from keras.models import load_model import csv import distance from jellyfish._jellyfish import damerau_levenshtein_distance from sklearn ...
mit
SU-ECE-17-7/ibeis
ibeis/scripts/classify_shark.py
1
52673
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import utool as ut import numpy as np import sklearn import sklearn.datasets import sklearn.svm import sklearn.metrics from sklearn import preprocessing from ibeis_cnn.models import abstract_models from os.path im...
apache-2.0
PanDAWMS/pilot
RunJobEvent.py
1
219652
# Class definition: # RunJobEvent: module for receiving and processing events from the Event Service # Instances are generated with RunJobFactory via pUtil::getRunJob() # Implemented as a singleton class # http://stackoverflow.com/questions/42558/python-and-the-singleton-pattern # Import relevant python/pilot...
apache-2.0
franeviso/pva-gisera
rescue_processing.py
1
46601
import numpy as np import csv import matplotlib.pyplot as plt popsize = ['10','20','30','40','50'] safesites = ['0.25','0.3','0.35','0.4','0.45','0.5'] #safesites = ['0.25','0.3','0.35'] probnews = ['0.0','0.2','0.4','0.6','0.8','1.0'] #probnews = ['0.0','0.2','0.4','0.6'] # demographic files persist = np.zeros((...
apache-2.0
bdh1011/wau
venv/lib/python2.7/site-packages/pandas/io/tests/test_pytables.py
1
181497
import nose import sys import os import warnings import tempfile from contextlib import contextmanager import datetime import numpy as np import pandas import pandas as pd from pandas import (Series, DataFrame, Panel, MultiIndex, Categorical, bdate_range, date_range, timedelta_range, Index, Dateti...
mit
pjryan126/solid-start-careers
store/api/zillow/venv/lib/python2.7/site-packages/pandas/tests/test_panel.py
1
92862
# -*- coding: utf-8 -*- # pylint: disable=W0612,E1101 from datetime import datetime import operator import nose from functools import wraps import numpy as np import pandas as pd from pandas import Series, DataFrame, Index, isnull, notnull, pivot, MultiIndex from pandas.core.datetools import bday from pandas.core.n...
gpl-2.0
yeatmanlab/pyAFQ
AFQ/viz/utils.py
2
73629
from collections import OrderedDict import os.path as op import os import logging import tempfile import numpy as np from scipy.stats import sem import pandas as pd import imageio as io import IPython.display as display import seaborn as sns import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matp...
bsd-2-clause
NextThought/pypy-numpy
numpy/linalg/linalg.py
1
67505
"""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