def freeze(h, output_yaml, resolve, groups):
    """Output installed packages."""
    if not groups:
        groups = filter(lambda group: not group.lower().startswith("bower"),
                        h.requirements.keys())
    else:
        groups = [text_type.strip(group) for group in groups.split(",")]

    if output_yaml:
        for requirements in h.requirements.values():
            for requirement in requirements:
                if resolve and not requirement.version:
                    requirement.load_installed_version()
        click.echo(h.requirements.yaml)
    else:
        for group in groups:
            if not h.requirements[group]:
                continue
            click.echo("# {}".format(group))
            for requirement in h.requirements[group]:
                if resolve and not requirement.version:
                    requirement.load_installed_version()
                click.echo(str(requirement))
def _split_vertical(container):
		r1 = None
		r2 = None
		min_w = int(W_RATIO*container.h)+1
		if container.w < 2*min_w:
			return None
		r1 = Container(container.x,container.y,randint(min_w, container.w-min_w),container.h)
		r2 = Container(container.x+r1.w,container.y,container.w-r1.w,container.h)
		return [r1, r2]