List all available spectrum descriptions that can be used for peak list simulation.

    :param str args: Spectrum name(s), e.g. list_spectrum_descriptions("HNCO", "HNcoCACB"), leave empty to list everything.
    :return: None
    :rtype: :py:obj:`None`
349224
def list_spectrum_descriptions(*args):
    
    if args:
        for spectrum_name in args:
            pprint.pprint({spectrum_name: SPECTRUM_DESCRIPTIONS.get(spectrum_name, None)}, width=120)
    else:
        pprint.pprint(SPECTRUM_DESCRIPTIONS, width=120)
799911
def list(options)
      file = File.open(FILE_PATH, 'a+')
      servers = all_hosts_in(file)
      file.close
      if servers.empty?
        PRINTER.print 'No aliases added'
      else
        PRINTER.print 'Listing aliases:'
        servers.each{|x| PRINTER.print "\t- #{x}"}
      end
      finish_exec
    end
127323
def list(self, spec=None):
        

        if spec is None:
            spec = {}

        xmlrpc = XMLRPCConnection()
        try:
            pool_list = xmlrpc.connection.list_pool(
                {
                    'pool': spec,
                    'auth': AuthOptions().options
                })
        except xmlrpclib.Fault as xml_fault:
            raise _fault_to_exception(xml_fault)
        res = list()
        for pool in pool_list:
            p = Pool.from_dict(pool)
            res.append(p)

        return res
427086
def hsll(wnd, res=20, neighbors=2):
  
  spectrum = dB20(rfft(wnd, res * len(wnd)))
  first_peak = next(get_peaks(spectrum, neighbors=neighbors))
  return max(spectrum[first_peak:]) - spectrum[0]
701470
def default_signal_map():
    
    name_map = {
        'SIGTSTP': None,
        'SIGTTIN': None,
        'SIGTTOU': None,
        'SIGTERM': 'terminate'}
    signal_map = {}
    for name, target in list(name_map.items()):
        if hasattr(signal, name):
            signal_map[getattr(signal, name)] = target
    return signal_map
256418
def _parse_spectra(self, line):
        
        if line in ['\n', '\r\n', '//\n', '//\r\n', '', '//']:
            self.start_spectra = False
            self.current_id_meta += 1
            self.collect_meta = True
            return

        splist = line.split()

        if len(splist) > 2 and not self.ignore_additional_spectra_info:
            additional_info = ''.join(map(str, splist[2:len(splist)]))
        else:
            additional_info = ''

        srow = (
            self.current_id_spectra, float(splist[0]), float(splist[1]), additional_info,
            self.current_id_meta)

        self.spectra_all.append(srow)

        self.current_id_spectra += 1
645149
def list(self, service_name, **params):
        
        result = self._invoke_call(service_name, 'list', **params)
        if result is not None:
            return result.get(service_name, list())
        return list()
676008
def _list_packages(self, args):
        '''
        
        '''
        packages = self._pkgdb_fun('list_packages', self.db_conn)
        for package in packages:
            if self.opts['verbose']:
                status_msg = ','.join(package)
            else:
                status_msg = package[0]
            self.ui.status(status_msg)
787366
def _detect_available_configs():
        
        with channels_lock:
            available_channels = list(channels.keys())

        # find a currently unused channel
        get_extra = lambda: "channel-{}".format(randint(0, 9999))
        extra = get_extra()
        while extra in available_channels:
            extra = get_extra()

        available_channels += [extra]

        return [
            {'interface': 'virtual', 'channel': channel}
            for channel in available_channels
        ]
1318868
def list_(*, cursor: str=None,
          exclude_archived: bool=None,
          exclude_members: bool=None,
          limit: int=None) -> snug.Query[Page[t.List[Channel]]]:
    """"""
    kwargs = {
        'exclude_archived': exclude_archived,
        'exclude_members':  exclude_members,
        'limit':            limit
    }
    response = yield {'cursor': cursor, **kwargs}
    try:
        next_cursor = response['response_metadata']['next_cursor']
    except KeyError:
        next_query = None
    else:
        next_query = list_(**kwargs, cursor=next_cursor)
    return Page(
        load_channel_list(response['channels']),
        next_query=next_query,
    )
869579
def list_tags(self):
        

        try:
            tags = Tags.list()
        except NipapError, e:
            return json.dumps({'error': 1, 'message': e.args, 'type': type(e).__name__})

        return json.dumps(tags, cls=NipapJSONEncoder)
425952
def _bse_cli_list_basis_sets(args):
    ''''''
    metadata = api.filter_basis_sets(args.substr, args.family, args.role, args.data_dir)

    if args.no_description:
        liststr = metadata.keys()
    else:
        liststr = format_columns([(k, v['description']) for k, v in metadata.items()])

    return '\n'.join(liststr)
352913
def build_listing(self):
        
        def func_entry(name, func):
            args, varargs, defaults = self._get_arg_spec(func)

            # add regular arguments
            params = [{'name': str(a), 'optional': a in defaults, 'vararg': False} for a in args if a != 'ctx']

            # add possible variable argument
            if varargs:
                params += [{'name': str(varargs), 'optional': False, 'vararg': True}]

            return {'name': str(name.upper()),
                    'description': str(func.__doc__).strip(),
                    'params': params}

        listing = [func_entry(f_name, f) for f_name, f in self._functions.items()]
        return sorted(listing, key=lambda l: l['name'])
572443
def create_spectra_lookup(lookup, fn_spectra):
    """"""
    to_store = []
    mzmlmap = lookup.get_mzmlfile_map()
    for fn, spectrum in fn_spectra:
        spec_id = '{}_{}'.format(mzmlmap[fn], spectrum['scan'])
        mzml_rt = round(float(spectrum['rt']), 12)
        mzml_iit = round(float(spectrum['iit']), 12)
        mz = float(spectrum['mz'])
        to_store.append((spec_id, mzmlmap[fn], spectrum['scan'],
                         spectrum['charge'], mz, mzml_rt, mzml_iit))
        if len(to_store) == DB_STORE_CHUNK:
            lookup.store_mzmls(to_store)
            to_store = []
    lookup.store_mzmls(to_store)
    lookup.index_mzml()
227097
def get_channel_listing(self):
        
        return {'name': self.name,
                'key': self.channel.key,
                'type': self.channel.typ,
                'read_only': self.read_only,
                'is_online': self.is_online(),
                'actions': self.get_actions(),
                'unread': self.unread_count()}
994642
def show_help(self):
        
        output = [
            'Usage %s subcommand [options] [args]' % self.prog_name,
            '',
            'Available commands:',
            '',
        ]
        for cmd in self.get_commands():
            output.append('  %s' % cmd)
        output += ['', '']
        self.stdout.write(u'\n'.join(output))
1319509
def list_command(opts)
      usage = "Agent exposes the following commands:\n"
      COMMANDS.reject { |k, _| k == :list || k.to_s =~ /test/ }.each do |c|
        c.each { |k, v| usage += " - #{k.to_s}: #{v}\n" }
      end
      CommandIO.instance.reply(opts[:conn], usage)
    end