Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(32)  |  Call(20)  |  Derive(0)  |  Import(12)

        def check_dependency(name):
    if dependencies[name]['check']:
        return dependencies[name]['is_present']
    else:
        try:
            exec("import %s" % name)
            dependencies[name]['is_present'] = True
        except ImportError:
            warnings.warn(get_import_warning(name), DependencyWarning)
        except RuntimeError, errmsg:
            warnings.warn(get_runtime_warning(name, errmsg), DependencyWarning)
        dependencies[name]['check'] = True
        return dependencies[name]['is_present']
        


src/n/e/NeuroTools-0.2.0/src/signals/spikes.py   NeuroTools(Download)
import scipy.signal
import logging
from NeuroTools import check_dependency, check_numpy_version
from NeuroTools import analysis
 
 
 
from NeuroTools import check_dependency
HAVE_MATPLOTLIB = check_dependency('matplotlib')
if HAVE_MATPLOTLIB:
    import matplotlib
    matplotlib.use('Agg')
HAVE_PYLAB = check_dependency('pylab')

src/n/e/NeuroTools-0.2.0/src/signals/analogs.py   NeuroTools(Download)
 
import os, re, numpy
from NeuroTools import check_dependency, check_numpy_version
from NeuroTools.io import *
from NeuroTools.plotting import get_display, set_axis_limits, set_labels, SimpleMultiplot
 
HAVE_MATPLOTLIB = check_dependency('matplotlib')
    matplotlib.use('Agg')
 
HAVE_PYLAB = check_dependency('pylab')
if HAVE_PYLAB:
    import pylab

src/n/e/NeuroTools-0.2.0/src/plotting.py   NeuroTools(Download)
 
import sys, numpy
from NeuroTools import check_dependency
 
 
# Check availability of pylab (essential!)
if check_dependency('matplotlib'):
    from matplotlib.lines import Line2D
    from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
if check_dependency('pylab'):
    import pylab
 
# Check availability of PIL
PILIMAGEUSE = check_dependency('PIL')

src/n/e/NeuroTools-0.2.0/src/analysis.py   NeuroTools(Download)
import numpy as np
 
from NeuroTools import check_dependency
 
HAVE_MATPLOTLIB = check_dependency('matplotlib')
    MATPLOTLIB_ERROR = "The matplotlib package was not detected"
 
HAVE_PYLAB = check_dependency('pylab')
if HAVE_PYLAB:
    import pylab
from NeuroTools.plotting import get_display, set_labels
 
HAVE_PYLAB = check_dependency('pylab')
 
 

src/n/e/NeuroTools-0.2.0/src/visual_logging.py   NeuroTools(Download)
 
import zipfile, atexit, os
from NeuroTools import check_dependency
from datetime import datetime
from logging import CRITICAL, DEBUG, ERROR, FATAL, INFO, WARN, WARNING, NOTSET
from time import sleep
 
 
if check_dependency('matplotlib'):
 
 
if check_dependency('pylab'):
    import pylab
 

src/n/e/NeuroTools-0.2.0/src/stgen.py   NeuroTools(Download)
 
 
from NeuroTools import check_dependency
from signals import SpikeTrain, AnalogSignal
from numpy import array, log
    # and look for the kinks.
 
    if check_dependency('scipy'):
        from scipy.special import gammaincc
    Hpre = -log(gammaincc(a,(x-dt)/b))
    # support directly returning the log.
 
    if check_dependency('rpy'):
        from rpy import r
 
        return val
 
    elif check_dependency('rpy2'):
 
        from rpy2.robjects import r
 
        if not self.rpy_checked:
            self.have_rpy = check_dependency('rpy') or check_dependency('rpy2')
            self.rpy_checked = True
        if self.have_rpy:

src/n/e/NeuroTools-0.2.0/src/signals/intervals.py   NeuroTools(Download)
from NeuroTools import check_dependency
 
HAVE_INTERVAL = check_dependency('interval')
 
if HAVE_INTERVAL:

src/n/e/NeuroTools-0.2.0/src/optimize/parameter_search.py   NeuroTools(Download)
"""
 
from NeuroTools import check_dependency
 
# Check availability and version of IPython
if check_dependency('IPython'):

src/n/e/NeuroTools-0.2.0/src/random.py   NeuroTools(Download)
"""
 
from NeuroTools import check_dependency
 
import numpy, numpy.random
        """
 
        if check_dependency('scipy'):
            self.next = self._next_scipy
 

src/n/e/NeuroTools-0.2.0/src/io.py   NeuroTools(Download)
 
 
from NeuroTools import check_dependency
 
import os, logging, cPickle, numpy

  1 | 2  Next