Did I find the right examples for you? yes no

All Samples(6)  |  Call(3)  |  Derive(0)  |  Import(3)

src/a/u/audiogen-0.0.2/audiogen/sampler.py   audiogen(Download)
 
from .util import hard_clip
from .util import normalize
 
### Constants
	fmt = { 1: '<B', 2: '<h', 4: '<i' }[width]
	return (struct.pack(fmt, int(sample)) for sample in \
			normalize(hard_clip(generator, min, max),\
				min, max, -2**(width * 8 - 1), 2**(width * 8 - 1) - 1))
#	scale = float(2**(width * 8) - 1) / (max - min)

src/h/r/hroute-0.2.0/hroute/rewrite.py   hroute(Download)
 
 
from .util import headers_lines, normalize, send_body, \
absolute_http_url_re
 
    def rewrite_link(self, link):
        if not absolute_http_url_re.match(link) and \
                not link.startswith('mailto:') and \
                not link.startswith('javascript:'):
            link = normalize(self.prefix, link)

src/h/r/hroute-HEAD/hroute/rewrite.py   hroute(Download)
 
 
from .util import headers_lines, normalize, send_body, \
absolute_http_url_re
 
    def rewrite_link(self, link):
        if not absolute_http_url_re.match(link) and \
                not link.startswith('mailto:') and \
                not link.startswith('javascript:'):
            link = normalize(self.prefix, link)