Commits

Ralph Bean committed 8cc796f

PEP8 in samples.py.

  • Participants
  • Parent commits a95e561

Comments (0)

Files changed (1)

File tw2/protovis/custom/samples.py

 import random
 import os
 
+
 class DemoSparkLine(SparkLine):
     p_height = 10
     p_data = [
           120, 50, 35, 20, 10, 15, 30, 60, 105, 105, 105, 80, 65
     ]
 
+
 class DemoSparkBar(SparkBar):
     p_height = 10
     p_data = [0.2, 0.3, 0.6, 0.1, 0.9, 0.8, 0.23, 0.77, 0.63, 0.43, 0.59, 0.11]
                 w = (float(i) / m - y) * z
                 a[i] += x * math.exp(-w * w)
             return a
+
         def f(*args):
             a = [0] * m
             for i in range(5):
             if x > 0:
                 return 2 * x * math.exp(x * -0.5)
             return 0
-        return map(lambda i : map(lambda j : f(i, j), range(m)), range(n))
+        return map(lambda i: map(lambda j: f(i, j), range(m)), range(n))
 
     # Actually use the 'layers' data
     p_data = layers(20, 400)
                     continue
                 nodename = "%s/%s" % (dir, file)
                 value = int(os.path.getsize(nodename)) + 1
-                clip = int(math.sqrt(value)/50.0) # trim text based on value
+                clip = int(math.sqrt(value) / 50.0)  # trim text based on value
                 p_data.append({
-                    'name' : nodename,
-                    'value' : value,
-                    'text' : nodename.split('/')[-1][:clip],
-                    'group' : "/".join(nodename.split('/')[:-1]),
+                    'name': nodename,
+                    'value': value,
+                    'text': nodename.split('/')[-1][:clip],
+                    'group': "/".join(nodename.split('/')[:-1]),
                 })
         return p_data