<s> """<STR_LIT>""" <EOL> from __future__ import print_function <EOL> from googleapiclient . discovery import build <EOL> SHOPPING_API_VERSION = '<STR_LIT>' <EOL> DEVELOPER_KEY = '<STR_LIT>' <EOL> def main ( ) : <EOL> """<STR_LIT>""" <EOL> client = build ( '<STR_LIT>' , SHOPPING_API_VERSION , developerKey = DEVELOPER_KEY ) <EOL> resource = client . products ( ) <EOL> request = resource . list ( source = '<STR_LIT>' , country = '<STR_LIT>' , q = u'<STR_LIT>' , <EOL> facets_include = '<STR_LIT>' , facets_enabled = True ) <EOL> response = request . execute ( ) <EOL> facet = response [ '<STR_LIT>' ] [ <NUM_LIT:0> ] <EOL> print ( '<STR_LIT>' % facet [ '<STR_LIT>' ] ) <EOL> labels = [ ] <EOL> values = [ ] <EOL> for bucket in facet [ '<STR_LIT>' ] : <EOL> labels . append ( bucket [ '<STR_LIT:value>' ] . rjust ( <NUM_LIT:20> ) ) <EOL> values . append ( bucket [ '<STR_LIT:count>' ] ) <EOL> weighting = <NUM_LIT> / max ( values ) <EOL> for label , value in zip ( labels , values ) : <EOL> print ( label , '<STR_LIT:#>' * int ( weighting * value ) , '<STR_LIT>' % value ) <EOL> print ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
