File: helper.py

package info (click to toggle)
pygooglechart 0.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 140 kB
  • ctags: 189
  • sloc: python: 899; makefile: 36
file content (10 lines) | stat: -rw-r--r-- 290 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
import random

def random_data(points=50, maximum=100):
    return [random.random() * maximum for a in xrange(points)]

def random_colour(min=20, max=200):
    func = lambda: int(random.random() * (max-min) + min)
    r, g, b = func(), func(), func()
    return '%02X%02X%02X' % (r, g, b)