Parses the data line and adds to the dictionary.
        :param sline: a split data line to parse
        :returns: the number of rows to jump and parse the next data line or
        return the code error -1
960572
def _handle_result_line(self, sline):
        
        # If there are less values founded than headers, it's an error
        if len(sline) != len(self._columns):
            self.err("One data line has the wrong number of items")
            return -1
        result = ''
        name = ''
        for idx, val in enumerate(sline):
            if self._columns[idx] == 'Analyte Name':
                name = val
            elif self._columns[idx] == 'Analyte Result':
                result = self._convert_result(val)

        if not self._cur_values.get(self._keyword, None):
            self._cur_values[self._keyword] = {}

        self._cur_values[self._keyword][name] = result

        # Each line goes to result values as well in case AS'es for each
        # Analyte is created in Bika. For those kind of AS'es, keywords must be
        # the same as Analyte Name field from CSV.
        self._cur_values[name] = {
                'DefaultResult': 'Analyte Result',
                'Remarks': '',
                'Analyte Result': result,
                }

        # Adding this result to the previous results
        # in the self._cur_values dictionary, as an interim field.
        for key in self._cur_values:
            if key == name:
                continue
            self._cur_values[key][name] = result

        return 0
1149813
def parse(src, dest)
      return unless @tokens.size > 0

      File.open( src, "r" ) do |sf|
        File.open( dest, "w" ) do |df|
          sf.each do |sline|
            @tokens.each do |token, val|
              val = val.to_s unless (val.class == String)
              rtok = "#{@start_delim}#{token}#{@stop_delim}"
              sline.gsub!(rtok, val)
            end # each token

            df.write( sline )
          end # each src line
        end # Dest file open
      end # Src file open
    end
130605
def parse_data_line(self, line):
            
            it = self._generate(line)
            reader = csv.DictReader(it, fieldnames=self.headers)
            values = reader.next()
            values['DefaultResult'] = 'ResidualError'
            values['LineName'] = re.sub(r'\W', '', values['LineName'].strip())
            values['Concentration'] = values['Cc'].strip()
            values['StandardDeviation'] = values['SD'].strip()
            values['ResidualError'] = values['RSD'].strip()
            values['NetIntensity'] = values['Net_Intensity'].strip().split('/')
            values['Remarks'] = ''
            values['TestLine'] = ''
            self._addRawResult(self._resid, {values['LineName']: values}, False)
            return 0
368556
def _fill_slices(self, sls):
        """"""
        # Fill '...' entries with ':'
        nfill = self.ndim - len(sls)
        fsls = list()
        for sl in sls:
            if sl is Ellipsis:
                while nfill:
                    fsls.append(slice(None, None))
                    nfill -= 1
                fsls.append(slice(None, None))
            else:
                fsls.append(sl)

        # Append ':' to the end
        for _ in range(self.ndim - len(fsls)):
            fsls.append(slice(None, None))

        return fsls
441416
def parse_data_line(self, sline):
        

        temp_line = sline
        sline_ = ''.join(temp_line)
        sline_ = sline_.split('\t')
        headerdict = {}
        datadict = {}
        for idx, result in enumerate(sline_):
            if self._columns[idx] in self._includedcolumns:
                datadict[self._columns[idx]] = {'Result': result, 'DefaultResult': 'Result'}
            else:
                headerdict[self._columns[idx]] = result
        resid = headerdict['Sample ID']
        print(datadict)
        self._addRawResult(resid, datadict, False)
        self._header = headerdict
        return 0
1044291
def parse_response_start_line(line: str) -> ResponseStartLine:
    
    line = native_str(line)
    match = re.match("(HTTP/1.[0-9]) ([0-9]+) ([^\r]*)", line)
    if not match:
        raise HTTPInputError("Error parsing response start line")
    return ResponseStartLine(match.group(1), int(match.group(2)), match.group(3))
173045
def parse(self, lines):
    

    if isinstance(lines, str):
      lines = lines.split('\n')
    sub = _re.sub
    for line in lines:
      if line.endswith('\n'):
        line = line[:-1]
      line = line.lstrip()
      if not line.startswith('#'):
        invert = False
        if line.startswith('!'):
          line = line[1:]
          invert = True
        while line.endswith(' ') and line[-2:] != '\ ':
          line = line[:-1]
        line = sub(r'\\([!# ])', r'\1', line)
        if '/' in line and not line.startswith('/'):
          # Patterns with a slash can only be matched absolute.
          line = '/' + line
        self.patterns.append(Pattern(line, invert))
432688
def parse_headerline(self, line):
        
        if line.startswith('Date'):
            splitted = self.splitLine(line)
            if len(splitted) > 1:
                self._header['Date'] = splitted[1]
                if len(splitted) > 2 and splitted[2] == 'User':
                    self._header['Date'] = splitted[1]
                    self._header['User'] = splitted[3] \
                        if len(splitted) > 3 else ''
                else:
                    self.warn("Unexpected header format", numline=self._numline)
            else:
                self.warn("Unexpected header format", numline=self._numline)

            return 0

        if line.startswith('Time'):
            splitted = self.splitLine(line)
            if len(splitted) > 1:
                self._header['Time'] = splitted[1]
            else:
                self.warn("Unexpected header format", numline=self._numline)

            return 0

        if line.startswith('Sample/ctrl'):
            # Sample/ctrl ID    Pat/Ctr/cAl    Test name    Test type
            if len(self._header) == 0:
                self.warn("No header found", numline=self._numline)
                return -1

            #Grab column names
            self._end_header = True
            self._columns = self.splitLine(line)
            return 1
485984
def parse(self, lines):
        
        # states:
        #   0: start state
        #   1: saw user-agent line
        #   2: saw an allow or disallow line
        state = 0
        entry = Entry()

        for line in lines:
            if not line:
                if state == 1:
                    entry = Entry()
                    state = 0
                elif state == 2:
                    self._add_entry(entry)
                    entry = Entry()
                    state = 0
            # remove optional comment and strip line
            i = line.find('#')
            if i >= 0:
                line = line[:i]
            line = line.strip()
            if not line:
                continue
            line = line.split(':', 1)
            if len(line) == 2:
                line[0] = line[0].strip().lower()
                line[1] = urllib.parse.unquote(line[1].strip())
                if line[0] == "user-agent":
                    if state == 2:
                        self._add_entry(entry)
                        entry = Entry()
                    entry.useragents.append(line[1])
                    state = 1
                elif line[0] == "disallow":
                    if state != 0:
                        entry.rulelines.append(RuleLine(line[1], False))
                        state = 2
                elif line[0] == "allow":
                    if state != 0:
                        entry.rulelines.append(RuleLine(line[1], True))
                        state = 2
        if state == 2:
            self._add_entry(entry)
100700
def parse_data(self, sline):
        
        if sline[0] == '':
            return 0
        for idx, label in enumerate(self._labels_values[sline[0]]):
            if label != '':
                self._addRawResult(label.split(' ')[0], {self.analysiskey: sline[1:][idx]}, False)
        return 0
422521
def parse_modeline(code):
    
    seek = MODELINE_RE.search(code)
    if seek:
        return dict(v.split('=') for v in seek.group(1).split(':'))

    return dict()
1286579
def parse(self, data):
        """"""

        ASNlist = []
        for line in data.splitlines()[1:]:
            line = plain_str(line)
            if "|" not in line:
                continue
            asn, ip, desc = [elt.strip() for elt in line.split('|')]
            if asn == "NA":
                continue
            asn = "AS%s" % asn
            ASNlist.append((ip, asn, desc))
        return ASNlist
1144080
def parseerror(self, msg, line=None):
        """"""
        if line is None:
            line = self.sline
        error('parse error: ' + msg + ' on line {}'.format(line))
        sys.exit(-2)
241728
function parseLine(line) {
  // except for the command, no field has a space, so we split by that and piece the command back together
  var parts = line.split(/ +/);
  return {
      user    : parts[0]
    , pid     : parseInt(parts[1])
    , '%cpu'  : parseFloat(parts[2])
    , '%mem'  : parseFloat(parts[3])
    , vsz     : parseInt(parts[4])
    , rss     : parseInt(parts[5])
    , tty     : parts[6]
    , state   : parts[7]
    , started : parts[8]
    , time    : parts[9]
    , command : parts.slice(10).join(' ')
  }
}
1103130
def readline(self):
        
        data = self._file.readline()
        s = self.parse(data)
        return s
512074
def _readline(self):
        
        if len(self.lines) > 1:
            return self.lines.pop(0)

        tail = ''
        if len(self.lines):
            tail = self.lines.pop()

        try:
            tail += self._read()
        except socket.error:
            logging.exception('No new data')
            time.sleep(0.1)

        self.lines += linesepx.split(tail)
        if len(self.lines) > 1:
            return self.lines.pop(0)
252192
def parse_data_line(self, sline):
        
        # if there are less values founded than headers, it's an error
        if len(sline[4:]) != len(self._columns):
            self.err("One data line has the wrong number of items")
            return -1

        resid = sline[0]
        analysis = {}
        date = sline[3]
        if sline[0] in self.extrainfolist:
            return 0
        for idx, result in enumerate(sline[4:]):
            if result != '':
                analysis[self._columns[idx]] = {
                    'result': result,
                    'DefaultResult': 'result',
                    'DateTime': date,
                }
        self._addRawResult(resid, analysis, False)
        return 0