Compute the checksum of a full line

        Args:
            line (str): Line to compute the checksum from
        Return:
            int: Checksum (modulo 10)
340220
def _checksum(cls, line):
        
        tr_table = str.maketrans({c: None for c in ascii_uppercase + "+ ."})
        no_letters = line[:68].translate(tr_table).replace("-", "1")
        return sum([int(l) for l in no_letters]) % 10
1244275
def _calc_checksum(self, secret):
        
        return str_to_uascii(
            hashlib.sha256(mysql_aes_encrypt(self.salt, secret)).hexdigest()
        )
585575
def line_to_tuple line
      line = line.chomp.split('=', 2)

      if line.size == 2 and not line.include? "#"
        attr = get_hash_attr_from_rc line[0]
        return [ attr.to_sym, line[1] ]
      else
        return nil
      end
    end
758633
def checksum(digits):
    
    remainder = 10
    for digit in digits:
        remainder = (remainder + digit) % 10
        if remainder == 0:
            remainder = 10
        remainder = (remainder * 2) % 11

    control_digit = 11 - remainder
    if control_digit == 10:
        control_digit = 0
    return control_digit
631721
def calc_checksum(self, expanded=False):
        
        if expanded:
            cs = [int(np.sum(self.e_d_signal[ch]) % 65536) for ch in range(self.n_sig)]
        else:
            cs = np.sum(self.d_signal, 0) % 65536
            cs = [int(c) for c in cs]
        return cs
437431
def is_delimiter(line):
    
    return bool(line) and line[0] in punctuation and line[0]*len(line) == line
332862
def parse_line(line):
    '''  '''
    line = line.rstrip()
    line_type = _get_line_type(line)
    return TabLine(
        type=line_type,
        data=_DATA_PARSERS[line_type](line),
        original=line,
    )
445823
def split_line(self, line):
        
        remainder = []
        while True:
            try:
                args = shlex.split(line)
            except ValueError:
                remainder.append(line[-1])
                line = line[:-1]
            else:
                if remainder:
                    args.append(''.join(reversed(remainder)))
                return args
1205516
def _parse_line(line=''):
    '''
    
    '''
    parts = line.split()
    key = parts.pop(0)
    value = ' '.join(parts)
    return key, value
965894
def readline_check_physical(self):
        
        line = self.readline()
        if line:
            self.check_physical(line)
        return line
1044663
def calculate_checksum(self):
        
        checksum = ESPLoader.ESP_CHECKSUM_MAGIC
        for seg in self.segments:
            if seg.include_in_checksum:
                checksum = ESPLoader.checksum(seg.data, checksum)
        return checksum
184063
private static String[] getNmeaItems(String line) {
        String[] items = StringUtils.splitByWholeSeparatorPreserveAllTokens(line,
                PARAMETER_DELIMITER);
        // remove the checksum from the end
        String last = items[items.length - 1];
        if (last.contains("*"))
            items[items.length - 1] = last.substring(0, last.lastIndexOf('*'));
        return items;
    }
190839
def checksum(path):
    """"""
    hasher = hashlib.sha1()
    with open(path, 'rb') as stream:
        buf = stream.read(BLOCKSIZE)
        while len(buf) > 0:
            hasher.update(buf)
            buf = stream.read(BLOCKSIZE)
    return hasher.hexdigest()
865012
function(line) {
  const length = getLength(line);
  let output;
  if (length > 100) {
    output = (Math.round(length / 1000 * 100) / 100) +
        ' ' + 'km';
  } else {
    output = (Math.round(length * 100) / 100) +
        ' ' + 'm';
  }
  return output;
}
699442
def hacking_has_only_comments(physical_line, filename, lines, line_number):
    
    if line_number == 1 and all(map(EMPTY_LINE_RE.match, lines)):
        return (0, "H104: File contains nothing but comments")
297105
def check_physical(self, line):
        
        self.physical_line = line
        if self.indent_char is None and len(line) and line[0] in ' \t':
            self.indent_char = line[0]
        for name, check, argument_names in self.physical_checks:
            result = self.run_check(check, argument_names)
            if result is not None:
                offset, text = result
                self.report_error(self.line_number, offset, text, check)
1290704
def parse_checksums(checksums_string):
    """"""
    checksums_list = []
    for line in checksums_string.split('\n'):
        try:
            # skip empty lines
            if line == '':
                continue

            checksum, filename = line.split()
            # strip leading ./
            if filename.startswith('./'):
                filename = filename[2:]
            checksums_list.append({'checksum': checksum, 'file': filename})
        except ValueError:
            logging.debug('Skipping over unexpected checksum line %r', line)
            continue

    return checksums_list