def _get_aws_auth_param(self, params, secret_key, path='/'):
        keys = params.keys()
        keys.sort()
        pairs = []
        for key in keys:
            pairs.append(urllib.quote(key, safe='') + '=' +
                         urllib.quote(params[key], safe='-_~'))

        qs = '&'.join(pairs)
        string_to_sign = '\n'.join(('GET', self.host, path, qs))

        b64_hmac = base64.b64encode(
            hmac.new(secret_key, string_to_sign, digestmod=sha256).digest()
        )
        return b64_hmac
Test efficient normal accumulation for surfaces
dataset/ETHPy150Open secondstory/dewpoint/libcloud/drivers/ec2.py/EC2Connection._get_aws_auth_param--crossover with--dataset/ETHPy150Open mne-tools/mne-python/mne/tests/test_source_space.py/test_accumulate_normals