deprecated (used in ipmag)
323874
def plot_site(fignum, SiteRec, data, key):
    
    print('Site mean data: ')
    print('   dec    inc n_lines n_planes kappa R alpha_95 comp coord')
    print(SiteRec['site_dec'], SiteRec['site_inc'], SiteRec['site_n_lines'], SiteRec['site_n_planes'], SiteRec['site_k'],
          SiteRec['site_r'], SiteRec['site_alpha95'], SiteRec['site_comp_name'], SiteRec['site_tilt_correction'])
    print('sample/specimen, dec, inc, n_specs/a95,| method codes ')
    for i in range(len(data)):
        print('%s: %s %s %s / %s | %s' % (data[i]['er_' + key + '_name'], data[i][key + '_dec'], data[i]
                                          [key + '_inc'], data[i][key + '_n'], data[i][key + '_alpha95'], data[i]['magic_method_codes']))
    plot_slnp(fignum, SiteRec, data, key)
    plot = input("s[a]ve plot, [q]uit or <return> to continue:   ")
    if plot == 'q':
        print("CUL8R")
        sys.exit()
    if plot == 'a':
        files = {}
        for key in list(EQ.keys()):
            files[key] = site + '_' + key + '.' + fmt
        save_plots(EQ, files)
788752
function deprecateRenamedMethod(book, key, instance, oldName, newName, msg) {
    msg = msg || ('"' + oldName + '" is deprecated, use "' + newName + '()" instead');
    var fn = objectPath.get(instance, newName);

    instance[oldName] = deprecateMethod(book, key, fn, msg);
}
874970
def deprecated (func):
    """"""
    def newfunc (*args, **kwargs):
        """Print deprecated warning and execute original function."""
        warnings.warn("Call to deprecated function %s." % func.__name__,
                      category=DeprecationWarning)
        return func(*args, **kwargs)
    return update_func_meta(newfunc, func)
1205760
def pix2ang(nside, ipix, nest=False, lonlat=False):
    """"""
    lon, lat = healpix_to_lonlat(ipix, nside, order='nested' if nest else 'ring')
    return _lonlat_to_healpy(lon, lat, lonlat=lonlat)
1188768
function deinterlace(pixels, width) {

                    var newPixels = new Array(pixels.length);
                    var rows = pixels.length / width;
                    var cpRow = function(toRow, fromRow) {
                        var fromPixels = pixels.slice(fromRow * width, (fromRow + 1) * width);
                        newPixels.splice.apply(newPixels, [toRow * width, width].concat(fromPixels));
                    };

                    // See appendix E.
                    var offsets = [0, 4, 2, 1];
                    var steps = [8, 8, 4, 2];

                    var fromRow = 0;
                    for (var pass = 0; pass < 4; pass++) {
                        for (var toRow = offsets[pass]; toRow < rows; toRow += steps[pass]) {
                            cpRow(toRow, fromRow);
                            fromRow++;
                        }
                    }

                    return newPixels;
                }
1190026
def deprecated(func, msg=None):
    

    message = msg or "Use of deprecated function '{}`.".format(func.__name__)

    @functools.wraps(func)
    def wrapper_func(*args, **kwargs):
        warnings.warn(message, DeprecationWarning, stacklevel=2)
        return func(*args, **kwargs)

    return wrapper_func
274943
@Deprecated
    public static void main(String[] args) throws Exception
    {
        final AgiServer server;

        server = new DefaultAgiServer();
        server.startup();
    }
366000
def deprecated(fun_name=None, msg=""):
    ''''''
    def _deprecated(fun):
        ''''''
        @wraps(fun)
        def _wrapper(*args, **kwargs):
            '''Issue deprecation warning and forward arguments to fun'''
            name = fun_name if fun_name is not None else fun.__name__
            _warn_deprecated('Call to deprecated function %s. %s' % (name, msg))
            return fun(*args, **kwargs)

        return _wrapper

    return _deprecated
1087943
def get_hostmap_deprecated(profiles):
    '''
    
    '''

    hostmap = dict()  # map pilot IDs to host names
    for pname, prof in profiles.iteritems():

        if not len(prof):
            continue

        if not prof[0][ru.MSG]:
            continue

        host, ip, _, _, _ = prof[0][ru.MSG].split(':')
        host_id = '%s:%s' % (host, ip)

        for row in prof:

            if 'agent_0.prof' in pname    and \
                    row[ru.EVENT] == 'advance' and \
                    row[ru.STATE] == rps.PMGR_ACTIVE:
                hostmap[row[ru.UID]] = host_id
                break

    return hostmap
966785
def getDarkCurrentAverages(exposuretimes, imgs):
    '''
    
    '''
    x, imgs_p = sortForSameExpTime(exposuretimes, imgs)
    s0, s1 = imgs[0].shape

    imgs = np.empty(shape=(len(x), s0, s1),
                    dtype=imgs[0].dtype)
    for i, ip in zip(imgs, imgs_p):
        if len(ip) == 1:
            i[:] = ip[0]
        else:
            i[:] = averageSameExpTimes(ip)
    return x, imgs
629026
def deprecated(func):
    """"""
    def newFunc(*args, **kwargs):
        warnings.warn("Call to deprecated function {}.".format(func.__name__),
                      category=DeprecationWarning, stacklevel=2)
        return func(*args, **kwargs)
    newFunc.__name__ = func.__name__
    newFunc.__doc__ = func.__doc__
    newFunc.__dict__.update(func.__dict__)
    return newFunc
785243
def warn_deprecated(message, stacklevel=2):  # pragma: no cover
    """"""

    warnings.warn(
        message,
        category=DeprecationWarning,
        stacklevel=stacklevel
    )
188268
@java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getHeaders() {
    return getHeadersMap();
  }
242019
function toMarkdown(m, options) {
    return block([
      title(signature(m)),
      m.get(f.type).map(code).getOrElse(''),
      m.get(f.deprecated).map(renderDeprecation).getOrElse(''),
      '',
      m.get(f.stability).map(renderStability).getOrElse(''),
      '',
      renderMeta(m),
      renderFunctionMeta(m),
      '',
      m.get(f.documentation).getOrElse('(No documentation)'),
      m.get(f.source).map(renderSource).getOrElse(''),
      renderProperties(m, options)
    ]);
  }
866201
def deprecate_module_with_proxy(module_name, module_dict, deprecated_attributes=None):
    
    def _ModuleProxy(module, depr):
        """Return a wrapped object that warns about deprecated accesses"""
        # http://stackoverflow.com/a/922693/2127762
        class Wrapper(object):
            def __getattr__(self, attr):
                if depr is None or attr in depr:
                    warnings.warn("Property %s is deprecated" % attr)

                return getattr(module, attr)

            def __setattr__(self, attr, value):
                if depr is None or attr in depr:
                    warnings.warn("Property %s is deprecated" % attr)
                return setattr(module, attr, value)
        return Wrapper()

    deprecated_import(module_name)

    deprs = set()
    for key in deprecated_attributes or module_dict:
        if key.startswith('_'):
            continue
        if callable(module_dict[key]) and not isbuiltin(module_dict[key]):
            module_dict[key] = deprecated(module_dict[key])
        else:
            deprs.add(key)
    sys.modules[module_name] = _ModuleProxy(sys.modules[module_name], deprs or None)
802649
def deprecated(func: Callable) -> Callable:
    """"""
    @functools.wraps(func)
    def _new_func(*args: Any, **kwargs: Any) -> Any:
        warnings.simplefilter('always', DeprecationWarning)  # turn off filter
        warnings.warn("Call to deprecated function {}.".format(func.__name__),
                      category=DeprecationWarning,
                      stacklevel=2)
        warnings.simplefilter('default', DeprecationWarning)  # reset filter
        return func(*args, **kwargs)
    return _new_func
1327806
def deprecated(msg=''):
    """"""
    @decorator.decorator
    def wrap(function, *args, **kwargs):
        if not kwargs.pop('disable_warning', False):
            warn(msg, DeprecationWarning)
        return function(*args, **kwargs)
    return wrap