obs-mbox-list   =   *([CFWS] ",") mailbox *("," [mailbox / CFWS])
545579
function obsMboxList() {
        return opts.strict ? null : wrap('obs-mbox-list', and(
            star(and(
                invis(opt(cfws)),
                literal(',')
            )),
            mailbox,
            star(and(
                literal(','),
                opt(and(
                    mailbox,
                    invis(cfws)
                ))
            ))
        )());
    }
689102
public void decodeStreams(List<IEvent> events, Writer sysout, Writer syserr) throws IOException {
    int lineBuffer = 160; 
    WriterOutputStream stdout = new WriterOutputStream(sysout, getCharset(), lineBuffer, true);
    WriterOutputStream stderr = new WriterOutputStream(syserr, getCharset(), lineBuffer, true);
    for (IEvent evt : events) {
      switch (evt.getType()) {
        case APPEND_STDOUT:
          if (sysout != null) {
            ((IStreamEvent) evt).copyTo(stdout);
          }
          break;

        case APPEND_STDERR:
          if (syserr != null) {
            ((IStreamEvent) evt).copyTo(stderr);
          }
          break;

        default:
          break;
    }
    }

    stdout.flush();
    stderr.flush();
  }
803545
def listxattr(self, req, ino, size):
        
        self.reply_err(req, errno.ENOSYS)
473807
function obsQP() {
        return opts.strict ? null : wrap('obs-qp', and(
            literal('\\'),
            or(literal('\0'), obsNoWsCtl, lf, cr)
        )());
    }
1131181
def email_list(mail)
      [mail.to, mail.bcc, mail.cc].flatten.uniq.compact
    end
248710
def setup_water_budget_obs(self):
        
        if self.mflist_waterbudget:
            org_listfile = os.path.join(self.org_model_ws,self.m.lst.file_name[0])
            if os.path.exists(org_listfile):
                shutil.copy2(org_listfile,os.path.join(self.m.model_ws,
                                                       self.m.lst.file_name[0]))
            else:
                self.logger.warn("can't find existing list file:{0}...skipping".
                                   format(org_listfile))
                return
            list_file = os.path.join(self.m.model_ws,self.m.lst.file_name[0])
            flx_file = os.path.join(self.m.model_ws,"flux.dat")
            vol_file = os.path.join(self.m.model_ws,"vol.dat")
            df = pyemu.gw_utils.setup_mflist_budget_obs(list_file,
                                                                flx_filename=flx_file,
                                                                vol_filename=vol_file,
                                                                start_datetime=self.m.start_datetime)
            if df is not None:
                self.obs_dfs["wb"] = df
            #line = "try:\n    os.remove('{0}')\nexcept:\n    pass".format(os.path.split(list_file)[-1])
            #self.logger.statement("forward_run line:{0}".format(line))
            #self.frun_pre_lines.append(line)
            self.tmp_files.append(os.path.split(list_file)[-1])
            line = "pyemu.gw_utils.apply_mflist_budget_obs('{0}',flx_filename='{1}',vol_filename='{2}',start_datetime='{3}')".\
                    format(os.path.split(list_file)[-1],
                           os.path.split(flx_file)[-1],
                           os.path.split(vol_file)[-1],
                           self.m.start_datetime)
            self.logger.statement("forward_run line:{0}".format(line))
            self.frun_post_lines.append(line)
149261
protected function _getMboxFormatOb($mailbox, $list = false)
    {
        if ($this->_capability()->isEnabled('UTF8=ACCEPT')) {
            try {
                return $list
                    ? new Horde_Imap_Client_Data_Format_ListMailbox_Utf8($mailbox)
                    : new Horde_Imap_Client_Data_Format_Mailbox_Utf8($mailbox);
            } catch (Horde_Imap_Client_Data_Format_Exception $e) {}
        }

        return $list
            ? new Horde_Imap_Client_Data_Format_ListMailbox($mailbox)
            : new Horde_Imap_Client_Data_Format_Mailbox($mailbox);
    }
275113
function _list($dir, $raw = true, $realpath = true)
    {
        if (!($this->bitmap & NET_SSH2_MASK_LOGIN)) {
            return false;
        }

        $dir = $this->_realpath($dir . '/');
        if ($dir === false) {
            return false;
        }

        // http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-8.1.2
        if (!$this->_send_sftp_packet(NET_SFTP_OPENDIR, pack('Na*', strlen($dir), $dir))) {
            return false;
        }

        $response = $this->_get_sftp_packet();
        switch ($this->packet_type) {
            case NET_SFTP_HANDLE:
                // http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-9.2
                // since 'handle' is the last field in the SSH_FXP_HANDLE packet, we'll just remove the first four bytes that
                // represent the length of the string and leave it at that
                $handle = substr($response, 4);
                break;
            case NET_SFTP_STATUS:
                // presumably SSH_FX_NO_SUCH_FILE or SSH_FX_PERMISSION_DENIED
                $this->_logError($response);
                return false;
            default:
                user_error('Expected SSH_FXP_HANDLE or SSH_FXP_STATUS', E_USER_NOTICE);
                return false;
        }

        $this->_save_dir($dir);

        $contents = array();
        while (true) {
            // http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-8.2.2
            // why multiple SSH_FXP_READDIR packets would be sent when the response to a single one can span arbitrarily many
            // SSH_MSG_CHANNEL_DATA messages is not known to me.
            if (!$this->_send_sftp_packet(NET_SFTP_READDIR, pack('Na*', strlen($handle), $handle))) {
                return false;
            }

            $response = $this->_get_sftp_packet();
            switch ($this->packet_type) {
                case NET_SFTP_NAME:
                    extract(unpack('Ncount', $this->_string_shift($response, 4)));
                    for ($i = 0; $i < $count; $i++) {
                        extract(unpack('Nlength', $this->_string_shift($response, 4)));
                        $shortname = $this->_string_shift($response, $length);
                        extract(unpack('Nlength', $this->_string_shift($response, 4)));
                        $longname = $this->_string_shift($response, $length);
                        $attributes = $this->_parseAttributes($response); // we also don't care about the attributes
                        if (!$raw) {
                            $contents[] = $shortname;
                        } else {
                            $contents[$shortname] = $attributes;
                            $fileType = $this->_parseLongname($longname);
                            if ($fileType) {
                                if ($fileType == NET_SFTP_TYPE_DIRECTORY && ($shortname != '.' && $shortname != '..')) {
                                    $this->_save_dir($dir . '/' . $shortname);
                                }
                                $contents[$shortname]['type'] = $fileType;
                            }
                        }
                        // SFTPv6 has an optional boolean end-of-list field, but we'll ignore that, since the
                        // final SSH_FXP_STATUS packet should tell us that, already.
                    }
                    break;
                case NET_SFTP_STATUS:
                    extract(unpack('Nstatus', $this->_string_shift($response, 4)));
                    if ($status != NET_SFTP_STATUS_EOF) {
                        $this->_logError($response, $status);
                        return false;
                    }
                    break 2;
                default:
                    user_error('Expected SSH_FXP_NAME or SSH_FXP_STATUS', E_USER_NOTICE);
                    return false;
            }
        }

        if (!$this->_send_sftp_packet(NET_SFTP_CLOSE, pack('Na*', strlen($handle), $handle))) {
            return false;
        }

        // "The client MUST release all resources associated with the handle regardless of the status."
        //  -- http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-8.1.3
        $response = $this->_get_sftp_packet();
        if ($this->packet_type != NET_SFTP_STATUS) {
            user_error('Expected SSH_FXP_STATUS', E_USER_NOTICE);
            return false;
        }

        extract(unpack('Nstatus', $this->_string_shift($response, 4)));
        if ($status != NET_SFTP_STATUS_OK) {
            $this->_logError($response, $status);
            return false;
        }

        return $contents;
    }
623603
function prefs_list($args)
    {
        if ($args['section'] != 'mailbox') {
            return $args;
        }

        // Load configuration
        $this->load_config();

        // Load localization and configuration
        $this->add_texts('localization/');

        if (!empty($_REQUEST['_framed'])) {
            $this->rc->output->add_label('newmail_notifier.title', 'newmail_notifier.testbody',
                'newmail_notifier.desktopunsupported', 'newmail_notifier.desktopenabled', 'newmail_notifier.desktopdisabled');
            $this->include_script('newmail_notifier.js');
        }

        // Check that configuration is not disabled
        $dont_override = (array) $this->rc->config->get('dont_override', array());

        foreach (array('basic', 'desktop', 'sound') as $type) {
            $key = 'newmail_notifier_' . $type;
            if (!in_array($key, $dont_override)) {
                $field_id = '_' . $key;
                $input    = new html_checkbox(array('name' => $field_id, 'id' => $field_id, 'value' => 1));
                $content  = $input->show($this->rc->config->get($key))
                    . ' ' . html::a(array('href' => '#', 'onclick' => 'newmail_notifier_test_'.$type.'()'),
                        $this->gettext('test'));

                $args['blocks']['new_message']['options'][$key] = array(
                    'title' => html::label($field_id, rcube::Q($this->gettext($type))),
                    'content' => $content
                );
            }
        }

        $type = 'desktop_timeout';
        $key = 'newmail_notifier_' . $type;
        if (!in_array($key, $dont_override)) {
            $field_id = '_' . $key;
            $select   = new html_select(array('name' => $field_id, 'id' => $field_id));

            foreach (array(5, 10, 15, 30, 45, 60) as $sec) {
                $label = $this->rc->gettext(array('name' => 'afternseconds', 'vars' => array('n' => $sec)));
                $select->add($label, $sec);
            }

            $args['blocks']['new_message']['options'][$key] = array(
                'title'   => html::label($field_id, rcube::Q($this->gettext('desktoptimeout'))),
                'content' => $select->show((int) $this->rc->config->get($key))
            );
        }

        return $args;
    }
67451
def _process_list(self, list_line):
        # -rw-r--r-- 1 ftp ftp 68	 May 09 19:37 testftp.txt
        
        res = list_line.split(' ', 8)
        if res[0].startswith('-'):
            self.state['file_list'].append(res[-1])
        if res[0].startswith('d'):
            self.state['dir_list'].append(res[-1])
1354832
def _build_obs(self, **kwargs):
        
        logging.debug('Building ObservationTree...')
        tree = ObservationTree()
        for k,v in kwargs.items():
            if k in self.ic.bands:
                if np.size(v) != 2:
                    logging.warning('{}={} ignored.'.format(k,v))
                    # continue
                    v = [v, np.nan]
                o = Observation('', k, 99) #bogus resolution=99
                s = Source(v[0], v[1])
                o.add_source(s)
                logging.debug('Adding {} ({})'.format(s,o))
                tree.add_observation(o)

        self.obs = tree
1088621
function listDocAsStream (opts) {
      return relax({ db: dbName, path: '_all_docs', qs: opts, stream: true })
    }
405489
function mailboxList() {
        return wrap('mailbox-list', or(
            and(
                mailbox,
                star(and(literal(','), mailbox))
            ),
            obsMboxList
        )());
    }
83233
def get_obs_leaves(self):
        
        obs_leaves = []
        for n in self:
            if n.is_leaf:
                if isinstance(n, ModelNode):
                    l = n.parent
                else:
                    l = n
            if l not in obs_leaves:
                obs_leaves.append(l)
        return obs_leaves
1266430
function render_mailboxlist($p)
    {
        $rcmail         = rcmail::get_instance();
        $archive_folder = $rcmail->config->get('archive_mbox');
        $show_real_name = $rcmail->config->get('show_real_foldernames');

        // set localized name for the configured archive folder
        if ($archive_folder && !$show_real_name) {
            if (isset($p['list'][$archive_folder])) {
                $p['list'][$archive_folder]['name'] = $this->gettext('archivefolder');
            }
            else {
                // search in subfolders
                $this->_mod_folder_name($p['list'], $archive_folder, $this->gettext('archivefolder'));
            }
        }

        return $p;
    }
509149
def tbfuncs(frames):
  ''
  return ['%s:%s:%s'%(os.path.split(f.f_code.co_filename)[-1],f.f_code.co_name,f.f_lineno) for f in frames]
697819
function obsNoWsCtl() {
        return opts.strict ? null : wrap('obs-NO-WS-CTL', compareToken(function (tok) {
            var code = tok.charCodeAt(0);
            return ((1 <= code && code <= 8) ||
                    (11 === code || 12 === code) ||
                    (14 <= code && code <= 31) ||
                    (127 === code));
        }));
    }