Advertise here

Permalink - http://pastebin.ws/96h31d - Python - 76.168.xx.xx - Posted September 18, 2009, 4:13 am

Validate HTML - Validate CSS

Reply tree

  • 96h31d - 4 years, 10 months, 4 days, 18 hours, 42 minutes ago - by 76.168.xx.xx
    • 9840v6 - 4 years, 9 months, 2 weeks, 4 hours, 43 minutes ago - by 200.40.xx.xx
    • c2mn7r - 4 years, 9 months, 1 week, 5 days, 21 hours, 11 minutes ago - by 90.30.xx.xx
    • cwyx4j - 4 years, 8 months, 3 weeks, 6 days, 11 hours, 53 minutes ago - by 201.167.xx.xx
    • 45j62q - 4 years, 6 months, 2 weeks, 6 hours, 48 minutes ago - by 82.216.xx.xx
    • bay0v0 - 4 years, 5 months, 2 weeks, 4 days, 4 hours, 23 minutes ago - by 193.146.xx.xx
    • 19o2ji - 4 years, 1 month, 4 weeks, 1 day, 22 hours, 14 minutes ago - by 81.208.xx.xx
    • 6dfewn - 4 years, 1 month, 4 weeks, 1 day, 22 hours, 14 minutes ago - by 81.208.xx.xx
    • 4bmqs - 10 hours, 53 minutes ago - by 127.255.xx.xx
    • 69xi2m - 4 years, 1 week, 3 days, 10 hours, 5 minutes ago - by 119.155.xx.xx
    • fh2ee9 - 3 years, 11 months, 3 weeks, 6 days, 16 hours, 12 minutes ago - by 83.221.xx.xx
    • e6yjng - 3 years, 10 months, 3 weeks, 4 days, 23 hours, 4 minutes ago - by 194.254.xx.xx
    • 2we81o - 3 years, 6 months, 2 weeks, 1 day, 15 hours, 48 minutes ago - by 85.130.xx.xx
    • 9ab48z - 3 years, 3 months, 4 weeks, 13 hours, 6 minutes ago - by 188.108.xx.xx
    • 1zo5p7 - 3 years, 3 months, 3 weeks, 4 days, 18 hours, 28 minutes ago - by 190.41.xx.xx
    • 7cjexx - 3 years, 3 months, 3 weeks, 3 days, 2 hours, 6 minutes ago - by 173.89.xx.xx
      • ct6bol - 3 years, 3 months, 3 weeks, 3 days, 2 hours, 6 minutes ago - by 173.89.xx.xx
        • dkifd8 - 3 years, 3 months, 3 weeks, 3 days, 2 hours, 6 minutes ago - by 173.89.xx.xx
          • dud56l - 3 years, 3 months, 3 weeks, 3 days, 2 hours, 6 minutes ago - by 173.89.xx.xx
            • ec9xbg - 1 year, 9 months, 4 weeks, 15 hours, 36 minutes ago - by 110.234.xx.xx
      • bg6b7z - 1 year, 9 months, 4 weeks, 19 hours, 21 minutes ago - by 222.133.xx.xx
    • 6rhen1 - 3 years, 1 month, 3 weeks, 1 day, 23 hours, 13 minutes ago - by 84.14.xx.xx
    • 8524l8 - 7 months, 4 days, 3 hours, 46 minutes ago - by 88.189.xx.xx
    • 77xtx - 7 months, 4 days, 5 hours, 16 minutes ago - by 109.99.xx.xx
    • 9swiga - 2 years, 7 months, 2 weeks, 2 days, 8 hours, 58 minutes ago - by 122.165.xx.xx
    • g8lxzk - 2 years, 5 months, 4 weeks, 1 day, 23 hours, 35 minutes ago - by 83.221.xx.xx
    • 7s80vy - 2 years, 3 months, 3 weeks, 5 days, 23 hours, 31 minutes ago - by 1.186.xx.xx
    • 3tojto - 2 years, 1 month, 2 weeks, 3 days, 19 hours, 4 minutes ago - by 219.65.xx.xx
    • 8d7ais - 1 year, 9 months, 1 week, 2 days, 16 hours, 25 minutes ago - by 178.212.xx.xx
    • fmm5ph - 1 year, 1 month, 2 days, 21 hours, 29 minutes ago - by 85.220.xx.xx
    • c1bhg5 - 1 year, 4 months, 2 days, 16 hours, 21 minutes ago - by 99.244.xx.xx
server-side Python example on how to use Dan Wellman's tag cloud generator: http://net.tutsplus.com/tutorials/javascript-ajax/building-a-jquery-powered-tag-cloud/
  1. #!/usr/bin/env python
  2.  
  3. import os
  4. import simplejson as json
  5.  
  6. def main():
  7.     if 'javascript' in os.environ.get('HTTP_ACCEPT',''):
  8.         print 'Content-type: application/json'
  9.     else:
  10.         print 'Content-type: text/plain'
  11.     print
  12.     info = {'tags':[{'tag':'beer','freq':'20'}, {'tag':'water','freq':'2'}]}
  13.     print json.dumps(info)
  14.  
  15. if __name__=='__main__':
  16.     main()
  17.