Advertise here

Permalink - http://pastebin.ws/96h31d - Python - 76.168.xx.xx - Posted September 18, 2009, 4:13 am - Expires in 3 weeks, 3 days, 19 hours, 8 minutes

Validate HTML - Validate CSS

Reply tree

  • 96h31d - 4 years, 11 months, 5 days, 14 hours, 51 minutes ago - by 76.168.xx.xx
    • 9840v6 - 4 years, 10 months, 2 weeks, 1 day, 51 minutes ago - by 200.40.xx.xx
    • c2mn7r - 4 years, 10 months, 1 week, 6 days, 17 hours, 20 minutes ago - by 90.30.xx.xx
    • cwyx4j - 4 years, 9 months, 4 weeks, 8 hours, 1 minute ago - by 201.167.xx.xx
    • 45j62q - 4 years, 7 months, 2 weeks, 1 day, 2 hours, 57 minutes ago - by 82.216.xx.xx
    • bay0v0 - 4 years, 6 months, 2 weeks, 5 days, 32 minutes ago - by 193.146.xx.xx
    • 19o2ji - 4 years, 3 months, 8 hours, 22 minutes ago - by 81.208.xx.xx
    • 6dfewn - 4 years, 3 months, 8 hours, 22 minutes ago - by 81.208.xx.xx
    • 4bmqs - 1 month, 1 day, 7 hours, 1 minute ago - by 127.255.xx.xx
    • 69xi2m - 4 years, 1 month, 1 week, 4 days, 6 hours, 13 minutes ago - by 119.155.xx.xx
    • fh2ee9 - 4 years, 4 weeks, 12 hours, 20 minutes ago - by 83.221.xx.xx
    • e6yjng - 3 years, 11 months, 3 weeks, 5 days, 19 hours, 12 minutes ago - by 194.254.xx.xx
    • 2we81o - 3 years, 7 months, 2 weeks, 2 days, 11 hours, 56 minutes ago - by 85.130.xx.xx
    • 9ab48z - 3 years, 4 months, 4 weeks, 1 day, 9 hours, 15 minutes ago - by 188.108.xx.xx
    • 1zo5p7 - 3 years, 4 months, 3 weeks, 5 days, 14 hours, 36 minutes ago - by 190.41.xx.xx
    • 7cjexx - 3 years, 4 months, 3 weeks, 3 days, 22 hours, 15 minutes ago - by 173.89.xx.xx
      • ct6bol - 3 years, 4 months, 3 weeks, 3 days, 22 hours, 14 minutes ago - by 173.89.xx.xx
        • dkifd8 - 3 years, 4 months, 3 weeks, 3 days, 22 hours, 14 minutes ago - by 173.89.xx.xx
          • dud56l - 3 years, 4 months, 3 weeks, 3 days, 22 hours, 14 minutes ago - by 173.89.xx.xx
            • ec9xbg - 1 year, 10 months, 4 weeks, 1 day, 11 hours, 44 minutes ago - by 110.234.xx.xx
      • bg6b7z - 1 year, 10 months, 4 weeks, 1 day, 15 hours, 29 minutes ago - by 222.133.xx.xx
    • 6rhen1 - 3 years, 2 months, 3 weeks, 2 days, 19 hours, 21 minutes ago - by 84.14.xx.xx
    • 8524l8 - 8 months, 4 days, 23 hours, 54 minutes ago - by 88.189.xx.xx
    • 77xtx - 8 months, 5 days, 1 hour, 24 minutes ago - by 109.99.xx.xx
    • 9swiga - 2 years, 8 months, 2 weeks, 3 days, 5 hours, 6 minutes ago - by 122.165.xx.xx
    • g8lxzk - 2 years, 7 months, 9 hours, 43 minutes ago - by 83.221.xx.xx
    • 7s80vy - 2 years, 4 months, 3 weeks, 6 days, 19 hours, 39 minutes ago - by 1.186.xx.xx
    • 3tojto - 2 years, 2 months, 2 weeks, 4 days, 15 hours, 12 minutes ago - by 219.65.xx.xx
    • 8d7ais - 1 year, 10 months, 1 week, 3 days, 12 hours, 33 minutes ago - by 178.212.xx.xx
    • fmm5ph - 1 year, 2 months, 3 days, 17 hours, 37 minutes ago - by 85.220.xx.xx
    • c1bhg5 - 1 year, 5 months, 3 days, 12 hours, 29 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.