Converts angle string to signed list.
182603
def strSlist(string):
    
    sign = '-' if string[0] == '-' else '+'
    values = [abs(int(x)) for x in string.split(':')]
    return _fixSlist(list(sign) + values)
603596
def parse_signed_by(content, canonicalize=True):
    
    s = content[-300:]
    m = _SIGNER_PATTERN.search(s) or _SIGNER_PATTERN2.search(s)
    if not m:
        return []
    signers = m.group(1)
    tmp_signers = signers.upper()
    if tmp_signers in (u'CONFIDENTIAL', u'UNCLASSIFIED'):
        return []
    if canonicalize:
        tmp_signers = tuple(re.split(ur'\s+', tmp_signers.strip()))
        if tmp_signers == (u'KEEGANPAAL',): # 04TAIPEI3991
            signers = [u'KEEGAN', u'PAAL']
        elif tmp_signers == (u'JOHNSONKEANE',): # 05ASUNCION807
            signers = [u'JOHNSON', u'KEANE']
        elif tmp_signers == (u'STEWARTBALTIMORE',): # 06MUSCAT396
            signers = [u'STEWART', u'BALTIMORE']
        elif tmp_signers == (u'BIGUSBELL',): # 06KIRKUK112
            signers = [u'BIGUS', u'BELL']
        else:
            signers = tmp_signers
    else:
        signers = [signers]
    return [c14n.canonicalize_surname(s) for s in signers] if canonicalize else signers
880647
def _convert_signed_hex(s):
    
    if s.startswith('0x') or s.startswith('-0x'):
        s = '{0:x}'.format(struct.unpack('Q', struct.pack('q', int(s, 16)))[0])
    return s.zfill(16)
960837
private static List<String> toSingletonList(String propertyName,
                                         String value) {
        if ((null == value) || (value.length() == 0)) {
            return null;
        }

        if (value.charAt(0) == '@') {
            // These are very common, so we use shared copies
            // of these collections instead of re-creating.
            List<String> list;

            if (ALL.equals(value)) {
                list = ALL_LIST;
            } else if (FORM.equals(value)){
                list = FORM_LIST;
            } else if (THIS.equals(value)) {
                list = THIS_LIST; 
            } else if (NONE.equals(value)) {
                list = NONE_LIST;
            } else {
                // RELEASE_PENDING i18n ;
                throw new FacesException(value
                                     + " : Invalid id keyword specified for '"
                                     + propertyName
                                     + "' attribute");
            }
            
            return list;
        }
         
        return Collections.singletonList(value);
    }
1241379
def from_string(string):
        
        lines = string.split("\n")
        toks = lines[0].split()
        lengths = [float(i) for i in toks]
        toks = lines[1].split()
        angles = [float(i) for i in toks[0:3]]
        latt = Lattice.from_lengths_and_angles(lengths, angles)
        sp = []
        coords = []
        for l in lines[4:]:
            m = re.match(
                r"\d+\s+(\w+)\s+([0-9\-\.]+)\s+([0-9\-\.]+)\s+([0-9\-\.]+)",
                l.strip())
            if m:
                sp.append(m.group(1))
                coords.append([float(m.group(i)) for i in range(2, 5)])
        return Cssr(Structure(latt, sp, coords))
276381
def signed_headers(self):
        
        # See if the signed headers are listed in the query string
        signed_headers = self.query_parameters.get(_x_amz_signedheaders)
        if signed_headers is not None:
            signed_headers = url_unquote(signed_headers[0])
        else:
            # Get this from the authentication header
            signed_headers = self.authorization_header_parameters[
                _signedheaders]

        # Header names are separated by semicolons.
        parts = signed_headers.split(";")

        # Make sure the signed headers list is canonicalized.  For security
        # reasons, we consider it an error if it isn't.
        canonicalized = sorted([sh.lower() for sh in parts])
        if parts != canonicalized:
            raise AttributeError("SignedHeaders is not canonicalized: %r" %
                                 (signed_headers,))

        # Allow iteration in-order.
        return OrderedDict([(header, self.headers[header])
                            for header in signed_headers.split(";")])
595458
def to_str(self):
        ''''''
        pairs = []
        for name, value in self.get_all():
            if value and self._wrap_width:
                pairs.append('{0}:{1}'.format(
                    name,
                    '\r\n'.join(textwrap.wrap(
                        value, width=self._wrap_width,
                        drop_whitespace=False, initial_indent=' ',
                        subsequent_indent=' '
                    ))
                ))
            elif value:
                pairs.append('{0}: {1}'.format(name, value))
            else:
                pairs.append('{0}:'.format(name))

        pairs.append('')
        return '\r\n'.join(pairs)
987726
private String calculateStringToSignV1(Map<String, List<String>> parameters) {
        StringBuilder data = new StringBuilder();
        SortedMap<String, List<String>> sorted =
            new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
        sorted.putAll(parameters);

        for (Map.Entry<String, List<String>> entry : sorted.entrySet()) {
            for (String value : entry.getValue()) {
                data.append(entry.getKey())
                    .append(value);
            }
        }

        return data.toString();
    }
622908
public static Map<String, String> sign(Map<String, String> reqData,String encoding) {
		reqData = SDKUtil.filterBlank(reqData);
		SDKUtil.sign(reqData, encoding);
		return reqData;
	}
809749
def to_signed(cls, type_):
        
        if type_ in cls.unsigned:
            return {TYPE.ubyte: TYPE.byte_,
                    TYPE.uinteger: TYPE.integer,
                    TYPE.ulong: TYPE.long_}[type_]
        if type_ in cls.decimals or type_ in cls.signed:
            return type_
        return cls.unknown
661259
def write_a_lin(angle)
     scaled = 0

     angle = (60000 * angle).to_i

     attributes = [
         ['ang',    angle],
         ['scaled', scaled]
      ]

      @writer.empty_tag('a:lin', attributes)
    end
1305208
private static String calculateStringToSignV1(Map<String, String> parameters) {
        StringBuilder data = new StringBuilder();
        Map<String, String> sorted = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
        sorted.putAll(parameters);
        Iterator<Entry<String, String>> pairs = sorted.entrySet().iterator();
        while (pairs.hasNext()) {
            Map.Entry<String, String> pair = pairs.next();
            data.append(pair.getKey());
            data.append(pair.getValue());
        }
        return data.toString();
    }
333922
def _SignedVarintEncoder():
  """"""

  local_chr = chr
  def EncodeSignedVarint(write, value):
    if value < 0:
      value += (1 << 64)
    bits = value & 0x7f
    value >>= 7
    while value:
      write(0x80|bits)
      bits = value & 0x7f
      value >>= 7
    return write(bits)

  return EncodeSignedVarint
300959
def p_integerdecl_signed(self, p):
        ''
        intlist = [Integer(r,
                           Width(msb=IntConst('31', lineno=p.lineno(3)),
                                 lsb=IntConst('0', lineno=p.lineno(3)),
                                 lineno=p.lineno(3)),
                           signed=True, lineno=p.lineno(3)) for r in p[2]]
        p[0] = Decl(tuple(intlist), lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
911173
def signed_int_to_unsigned_hex(signed_int: int) -> str:
    
    hex_string = hex(struct.unpack('Q', struct.pack('q', signed_int))[0])[2:]
    if hex_string.endswith('L'):
        return hex_string[:-1]
    return hex_string
341759
def get_signature_string(params, secret):
    
    str_list = [str(item) for item in extract_params(params)]
    str_list.sort()
    return (secret + ''.join(str_list)).encode('utf-8')
3115
def signature_str(self):
        
        name, parameters, returnVars = self.signature
        return name+'('+','.join(parameters)+') returns('+','.join(returnVars)+')'