Codebase list sugar-pippy-activity / 6cc2094
Port to Python 3 - non-tutorial examples James Cameron 4 years ago
17 changed file(s) with 227 addition(s) and 227 deletion(s). Raw diff Collapse all Expand all
00 import pippy
11
2 for i in xrange(0, 50):
2 for i in range(0, 50):
33 pippy.console.clear()
44 if i < 25:
55 pippy.console.red()
77 pippy.console.blue()
88
99 # Note that we have to escape backslashes
10 print '\\o/'
11 print '_|_'
12 print ' '
10 print('\\o/')
11 print('_|_')
12 print(' ')
1313 pippy.wait()
1414
1515 pippy.console.clear()
16 print '_o_'
17 print ' | '
18 print '/ \\'
16 print('_o_')
17 print(' | ')
18 print('/ \\')
1919 pippy.wait()
2020
2121 pippy.console.clear()
22 print ' o '
23 print '/|\\'
24 print '| |'
22 print(' o ')
23 print('/|\\')
24 print('| |')
2525 pippy.wait()
2626
2727 pippy.console.clear()
28 print '_o_'
29 print ' | '
30 print '/ \\'
28 print('_o_')
29 print(' | ')
30 print('/ \\')
3131 pippy.wait()
0 # -*- coding: utf-8 -*-
1 # This is the game life http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
2
3 import os
4 import time
5 import random
6
7
8 def LoadCells(rows, cols):
9 """ We need a function to load cells in the neighborhood """
10 grid = []
11 col = [0] * cols
12 # first we load an empty grid
13 for i in range(rows):
14 col = [0] * cols
15 grid.append(col)
16 # then we load some cells
17 for x in range(rows):
18 for y in range(cols):
19 cell = random.randint(0, random.randint(0, 1))
20 grid[x][y] = cell
21 return grid
22
23
24 def DrawGrid(grid):
25 """ Here we draw the grid """
26 """ Test: Print the number of neighbors of living cells """
27 rows = len(grid)
28 cols = len(grid[1])
29 # print rows, cols
30 for x in range(rows):
31 for y in range(cols):
32 if grid[x][y] != 1:
33 print '.',
34 else:
35 neighbors = CountNeighbors(grid, x, y)
36 print chr(neighbors+48),
37 # print 'o',
38 print '\n',
39
40
41 def CountNeighbors(grid, x, y):
42 """ Count neighbors arround a single cell"""
43
44 neighbors = 0
45 rows = len(grid)
46 cols = len(grid[1])
47
48 # if x < (rows - 1) and grid[x + 1][y] == 1:
49 # neighbors += 1
50 # if x > 0 and grid[x - 1][y] == 1:
51 # neighbors += 1
52 # if y < (cols - 1) and grid[x][y + 1] == 1:
53 # neighbors += 1
54 # if y > 0 and grid[x][y - 1] == 1:
55 # neighbors += 1
56 # if x < (rows - 1) and y < (cols - 1) and grid[x + 1][y + 1] == 1:
57 # neighbors += 1
58 # if x > 0 and y > 0 and grid[x - 1][y - 1] == 1:
59 # neighbors += 1
60 # if x > 0 and y < (cols - 1) and grid[x - 1][y + 1] == 1:
61 # neighbors += 1
62 # if x < (rows - 1) and y > 0 and grid[x + 1][y - 1] == 1:
63 # neighbors += 1
64
65 neighbors += grid[(x+rows-1) % rows][(y+cols-1) % cols]
66 neighbors += grid[(x+rows-1) % rows][ y ]
67 neighbors += grid[(x+rows-1) % rows][(y +1) % cols]
68 neighbors += grid[ x ][(y+cols-1) % cols]
69 # neighbors += grid[ x ][ y ]
70 neighbors += grid[ x ][(y +1) % cols]
71 neighbors += grid[(x +1) % rows][(y+cols-1) % cols]
72 neighbors += grid[(x +1) % rows][ y ]
73 neighbors += grid[(x +1) % rows][(y +1) % cols]
74
75 return neighbors
76
77
78 def Iteration(grid):
79 """ here we define a single iteration :
80 # if we have between 3 and 6 neighbors the single cell lives
81 # in other case the cell dies
82 If a living cell has 2 or 3 neighbors, it survives
83 in other cases it dies.
84 A dead cell with 3 neighbors will become alive.
85 """
86 rows = len(grid)
87 cols = len(grid[1])
88
89 # grid0 = grid # Save the original grid for proper counts
90 grid0 = []
91 col = [0] * cols
92 # First we load an empty grid
93 for x in range(rows):
94 col = [0] * cols
95 grid0.append(col)
96
97 for x in range(rows):
98 for y in range(cols):
99 cell = grid[x][y]
100 grid0[x][y] = cell
101
102 # neighbors = 0
103 for x in range(rows):
104 for y in range(cols):
105 neighbors = CountNeighbors(grid0, x, y)
106 if grid0[x][y] == 1:
107 if neighbors < 2 or neighbors > 3:
108 grid[x][y] = 0
109 else:
110 if neighbors == 3:
111 grid[x][y] = 1
112
113 return grid
114
115 def Iterator(rows, cols, pulses):
116 """ Iterate n pulses and draws the result of each one """
117 pulse = 1
118 grid = LoadCells(rows, cols)
119 while pulse <= pulses:
120 # os.system('clear')
121 print 'Pulse: ', pulse
122 # Iteration(grid)
123 grid = Iteration(grid)
124 DrawGrid(grid)
125 pulse += 1
126 time.sleep(0.2)
127
128 number = input('Please input the number of rows and cols (unique number):')
129 pulses = input('Please input the number of pulses:')
130 Iterator(number, 4*number, pulses)
0 # -*- coding: utf-8 -*-
1 # This is the game life http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
2
3 import os
4 import time
5 import random
6
7
8 def LoadCells(rows, cols):
9 """ We need a function to load cells in the neighborhood """
10 grid = []
11 col = [0] * cols
12 # first we load an empty grid
13 for i in range(rows):
14 col = [0] * cols
15 grid.append(col)
16 # then we load some cells
17 for x in range(rows):
18 for y in range(cols):
19 cell = random.randint(0, random.randint(0, 1))
20 grid[x][y] = cell
21 return grid
22
23
24 def DrawGrid(grid):
25 """ Here we draw the grid """
26 """ Test: Print the number of neighbors of living cells """
27 rows = len(grid)
28 cols = len(grid[1])
29 # print rows, cols
30 for x in range(rows):
31 for y in range(cols):
32 if grid[x][y] != 1:
33 print('.', end=' ')
34 else:
35 neighbors = CountNeighbors(grid, x, y)
36 print(chr(neighbors+48), end=' ')
37 # print 'o',
38 print('\n', end=' ')
39
40
41 def CountNeighbors(grid, x, y):
42 """ Count neighbors arround a single cell"""
43
44 neighbors = 0
45 rows = len(grid)
46 cols = len(grid[1])
47
48 # if x < (rows - 1) and grid[x + 1][y] == 1:
49 # neighbors += 1
50 # if x > 0 and grid[x - 1][y] == 1:
51 # neighbors += 1
52 # if y < (cols - 1) and grid[x][y + 1] == 1:
53 # neighbors += 1
54 # if y > 0 and grid[x][y - 1] == 1:
55 # neighbors += 1
56 # if x < (rows - 1) and y < (cols - 1) and grid[x + 1][y + 1] == 1:
57 # neighbors += 1
58 # if x > 0 and y > 0 and grid[x - 1][y - 1] == 1:
59 # neighbors += 1
60 # if x > 0 and y < (cols - 1) and grid[x - 1][y + 1] == 1:
61 # neighbors += 1
62 # if x < (rows - 1) and y > 0 and grid[x + 1][y - 1] == 1:
63 # neighbors += 1
64
65 neighbors += grid[(x+rows-1) % rows][(y+cols-1) % cols]
66 neighbors += grid[(x+rows-1) % rows][ y ]
67 neighbors += grid[(x+rows-1) % rows][(y +1) % cols]
68 neighbors += grid[ x ][(y+cols-1) % cols]
69 # neighbors += grid[ x ][ y ]
70 neighbors += grid[ x ][(y +1) % cols]
71 neighbors += grid[(x +1) % rows][(y+cols-1) % cols]
72 neighbors += grid[(x +1) % rows][ y ]
73 neighbors += grid[(x +1) % rows][(y +1) % cols]
74
75 return neighbors
76
77
78 def Iteration(grid):
79 """ here we define a single iteration :
80 # if we have between 3 and 6 neighbors the single cell lives
81 # in other case the cell dies
82 If a living cell has 2 or 3 neighbors, it survives
83 in other cases it dies.
84 A dead cell with 3 neighbors will become alive.
85 """
86 rows = len(grid)
87 cols = len(grid[1])
88
89 # grid0 = grid # Save the original grid for proper counts
90 grid0 = []
91 col = [0] * cols
92 # First we load an empty grid
93 for x in range(rows):
94 col = [0] * cols
95 grid0.append(col)
96
97 for x in range(rows):
98 for y in range(cols):
99 cell = grid[x][y]
100 grid0[x][y] = cell
101
102 # neighbors = 0
103 for x in range(rows):
104 for y in range(cols):
105 neighbors = CountNeighbors(grid0, x, y)
106 if grid0[x][y] == 1:
107 if neighbors < 2 or neighbors > 3:
108 grid[x][y] = 0
109 else:
110 if neighbors == 3:
111 grid[x][y] = 1
112
113 return grid
114
115 def Iterator(rows, cols, pulses):
116 """ Iterate n pulses and draws the result of each one """
117 pulse = 1
118 grid = LoadCells(rows, cols)
119 while pulse <= pulses:
120 # os.system('clear')
121 print('Pulse: ', pulse)
122 # Iteration(grid)
123 grid = Iteration(grid)
124 DrawGrid(grid)
125 pulse += 1
126 time.sleep(0.2)
127
128 number = eval(input('Please input the number of rows and cols (unique number):'))
129 pulses = eval(input('Please input the number of pulses:'))
130 Iterator(number, 4*number, pulses)
55 result = 1
66 if number > 0:
77 result = number * factorial_recursive(number - 1)
8 print 'factorizing: ', number, ' result: ', result
8 print('factorizing: ', number, ' result: ', result)
99 return result
1010
1111
1414 result = 1
1515 for i in range(1, number + 1):
1616 result = result * i
17 print 'factorizing: ', i, ' result: ', result
17 print('factorizing: ', i, ' result: ', result)
1818 return result
1919
2020
2929 factorial_iterative(number)
3030 delta = time.time() - start
3131 if delta > 0:
32 print 'Type: ', type_s, ' in: ', 1 / delta
32 print('Type: ', type_s, ' in: ', 1 / delta)
3333 else:
34 print 'Type: ', type_s
34 print('Type: ', type_s)
3535
3636 # ask for a number to compute the factorial of
37 number = input('Please input a number:')
38 print 'Calculating...'
37 number = eval(input('Please input a number:'))
38 print('Calculating...')
3939 calculate(number, 0)
4040 calculate(number, 1)
00 a, b = 0, 1
11 while b < 1001:
2 print b,
2 print(b, end=' ')
33 a, b = b, a + b
11 import pippy
22 R = random.randrange(1, 100)
33
4 print 'Guess a number between 1 and 100!'
5 N = input('Enter a number: ')
4 print('Guess a number between 1 and 100!')
5 N = eval(input('Enter a number: '))
66 i = 1
77 while (N != R):
88 if N > R:
99 pippy.console.red()
10 print 'Too big... try again'
10 print('Too big... try again')
1111 else:
1212 pippy.console.blue()
13 print 'Too small.. try again'
13 print('Too small.. try again')
1414 pippy.console.black()
15 N = input('Enter a number: ')
15 N = eval(input('Enter a number: '))
1616 i = i + 1
1717
18 print 'You got it in', i, 'tries'
18 print('You got it in', i, 'tries')
99 newvector = vector[:]
1010 for j in range(0, len(vector) - 1):
1111 if (newvector[j] == 0):
12 print ' ',
12 print(' ', end=' ')
1313 else:
14 print '%2d' % newvector[j],
14 print('%2d' % newvector[j], end=' ')
1515 newvector[j] = vector[j - 1] + vector[j + 1]
16 print
16 print()
1717 vector = newvector[:]
44 pi += (4.0/a) - (4.0/b)
55 a += 4
66 b += 4
7 print pi
7 print(pi)
88 # Now that the result has been computed we can explore printing the result.
9 print "There are multiple ways to print numbers here is a quick sample."
10 print "Just print it :", pi
11 print "Using repr() :", repr(pi)
12 print "Our approximation: %3.20f" % pi
13 print "\nPi is a very famous number...."
9 print("There are multiple ways to print numbers here is a quick sample.")
10 print("Just print it :", pi)
11 print("Using repr() :", repr(pi))
12 print("Our approximation: %3.20f" % pi)
13 print("\nPi is a very famous number....")
1414 # Use python's math module it is faster and close enough for most computations.
1515 import math
16 print "Python's Math library computes"
17 print "a better value pi: %3.39f" % math.pi; # it uses...(math.atan(1.0) * 4.0)
16 print("Python's Math library computes")
17 print("a better value pi: %3.39f" % math.pi); # it uses...(math.atan(1.0) * 4.0)
1818 # when running computations based on "pi" it is good to begin with the best value you can get.
1919 # from the gnu 'C' comiler /usr/include/math.h"
20 print "For reference a more exact 32 bit floating point value for pi is."
21 print "Known value of pi: 3.14159265358979323846"
20 print("For reference a more exact 32 bit floating point value for pi is.")
21 print("Known value of pi: 3.14159265358979323846")
1212 newvector = vector[:]
1313 for j in range(0, len(vector) - 1):
1414 if (newvector[j] == 0):
15 print ' ',
15 print(' ', end=' ')
1616 else:
1717 remainder = newvector[j] % modulus
1818 if (remainder == 0):
19 print 'O',
19 print('O', end=' ')
2020 else:
21 print '.',
21 print('.', end=' ')
2222 newvector[j] = vector[j - 1] + vector[j + 1]
23 print
23 print()
2424 vector = newvector[:]
3131 r = rationals()
3232 i = 1
3333 while i<5:
34 print r.next()
34 print(next(r))
3535 i+=1
0 number = input('Which times table? ')
0 number = eval(input('Which times table? '))
11 for i in range(1, 13):
2 print i, 'x', number, '=', i * number
2 print(i, 'x', number, '=', i * number)
00 def square(x):
1 print x * x
1 print(x * x)
22
33 square(3)
44 square(4)
0 number = input('Enter a number: ')
0 number = eval(input('Enter a number: '))
11
22 if number > 5:
3 print 'Greater than 5'
3 print('Greater than 5')
44 elif number < 5:
5 print 'Less than 5'
5 print('Less than 5')
66 else:
7 print 'Number is 5!'
7 print('Number is 5!')
00 def count_backwards(number):
1 print 'I have the number', number
1 print('I have the number', number)
22 if number > 0:
3 print 'Calling count_backwards again!'
3 print('Calling count_backwards again!')
44 count_backwards(number - 1)
55 else:
6 print 'I am done counting'
6 print('I am done counting')
77
8 number = input('Enter a number: ')
8 number = eval(input('Enter a number: '))
99 count_backwards(number)
00 import pippy
11
2 print " ".join(pippy.sound.getSoundList())
2 print(" ".join(pippy.sound.getSoundList()))
0 name = raw_input("Type your name here: ")
1 print "Hello " + name + "!"
0 name = input("Type your name here: ")
1 print("Hello " + name + "!")
77 vowels = ['a', 'e', 'i', 'o', 'u']
88
99 # then we ask for a string to make the replacements
10 text = raw_input("Please input your text to translate to jeringoso:")
10 text = input("Please input your text to translate to jeringoso:")
1111 length = len(text)
1212 jeringoso = ""
1313 for i in range(length):
1717 else:
1818 jeringoso = jeringoso + char
1919
20 print jeringoso
20 print(jeringoso)
00 table = {
1 'Hardware & Mechanicals': 'John Watlington, Mark Foster, Mary Lou Jepsen, Yves Behar, Bret Recor, Mitch Pergola, Martin Schnitzer, Kenneth Jewell, Kevin Young, Jacques Gagne, Nicholas Negroponte, Frank Lee, Victor Chau, Albert Hsu, HT Chen, Vance Ke, Ben Chuang, Johnson Huang, Sam Chang, Alex Chu, Roger Huang, and the rest of the Quanta team, the Marvell team, the AMD team, the ChiMei team...',
2
3 'Firmware': 'Ron Minnich, Richard Smith, Mitch Bradley, Tom Sylla, Lilian Walter, Bruce Wang, James Cameron',
1 'Hardware & Mechanicals': 'John Watlington, Mark Foster, Mary Lou Jepsen, Yves Behar, Bret Recor, Mitch Pergola, Martin Schnitzer, Kenneth Jewell, Kevin Young, Jacques Gagne, Nicholas Negroponte, Frank Lee, Victor Chau, Albert Hsu, HT Chen, Vance Ke, Ben Chuang, Johnson Huang, Sam Chang, Alex Chu, Roger Huang, and the rest of the Quanta team, the Marvell team, the AMD team, the ChiMei team ...',
42
5 'Kernel & Drivers': 'Jaya Kumar, Jon Corbet, Reynaldo Verdejo, Pierre Ossman, Dave Woodhouse, Matthew Garrett, Chris Ball, Andy Tanenbaum, Linus Torvalds, Dave Jones, Andres Salomon, Marcelo Tosatti..',
6
7 'Graphics systems': 'Jordan Crouse, Daniel Stone, Zephaniah Hull, Bernardo Innocenti, Behdad Esfahbod, Jim Gettys, Adam Jackson, RobertTheKing, William Orr, Simon Schampijer, Gary Martin',
8
9 'Programming': 'Guido Van Rossum, Johan Dahlin, Brian Silverman, Alan Kay, Kim Rose, Bert Freudenberg, Yoshiki Ohshima, Takashi Yamamiya, Scott Wallace, Ted Kaehler, Stephane Ducasse, Hilaire Fernandes, David Narveaz, Tim Moody, Martin Langhoff, Paul Fox, Tim Shepard, Martin Abente Lahaye, Sam Parkinson, James Cameron, Ignacio Rodriguez, Jerry Vonau, Sebastian Silva, Ana Balica, rcunning01 Frederick Grose, Prason Shukla, Emil Dudev, Christofer Yael, cheekujodhpur, Agustin Zubiaga, Daniel Francis',
10
11 'Sugar': 'Marco Pesenti Gritti, Dan Williams, Chris Blizzard, John Palmieri, Lisa Strausfeld, Christian Marc Schmidt, Takaaki Okada, Eben Eliason, Walter Bender, Tomeu Vizoso, Simon Schampijer, Reinier Heeres, Ben Saller, Martin Dengler, Benjamin Berg, Daniel Drake, Jameson Quinn, Miguel Alvarez...',
12
13 'Activities': 'Erik Blankinship, Bakhtiar Mikhak, Manusheel Gupta, J.M. Maurer (uwog) and the Abiword team, the Mozilla team, Jean Piche, Barry Vercoe, Richard Boulanger, Greg Thompson, Arjun Sarwal, Cody Lodrige, Shannon Sullivan, Idit Harel, and the MaMaMedia team, John Huang, Bruno Coudoin, Eduardo Silva, Hakon Wium Lie, Don Hopkins, Muriel de Souza Godoi, Benjamin M. Schwartz..',
14
15 'Network': 'Michael Bletsas, James Cameron, Javier Cardona, Ronak Chokshi, Polychronis Ypodimatopoulos, Simon McVittie, Dafydd Harries, Sjoerd Simons, Morgan Collett, Guillaume Desmottes, Robert McQueen..',
16
17 'Security': 'Ivan Krstic, Michael Stone, C. Scott Ananian, Noah Kantrowitz, Herbert Poetzl, Marcus Leech..',
18
19 'Content': 'SJ Klein, Mako Hill, Xavier Alvarez, Alfonso de la Guarda, Sayamindu Dasgupta, Mallory Chua, Lauren Klein, Zdenek Broz, Felicity Tepper, Andy Sisson, Christine Madsen, Matthew Steven Carlos, Justin Thorp, Ian Bicking, Christopher Fabian, Wayne Mackintosh, the OurStories team, Will Wright, Chuck Normann..',
20
21 'Testing': 'Kim Quirk, Alex Latham, Giannis Galanis, Ricardo Carrano, Zach Cerza, John Fuhrer, Tom Gilliard, Niraj Nakrani',
22
23 'Country Support': 'Carla Gomez Monroy, David Cavallo, Matt Keller, Khaled Hassounah, Antonio Battro, Audrey Choi, Habib Kahn, Arnan (Roger) Sipitakiat, Reuben Caron',
24
25 'Administrative Support': 'Nia Lewis, Felice Gardner, Lindsay Petrillose, Jill Clarke, Julia Reynolds, Tracy Price, David Robertson, Danny Clark',
26
27 'Finance & Legal': 'Eben Moglen, Bruce Parker, William Kolb, John Sare, Sandra Lee, Richard Bernstein, Jaclyn Tsai, Jaime Cheng, Robert Fadel, Charles Kane (Grasshopper), Kathy Paur, Andriani Ferti',
28
29 'PR and Media': 'Larry Weber, Jackie Lustig, Jodi Petrie, George Snell, Kyle Austin, Hilary Meserole, Erick A. Betancourt, Michael Borosky, Sylvain Lefebvre, Martin Le Sauteur',
30
31 'Directors & Advisors': 'Howard Anderson, Rebecca Allen, Ayo Kusamotu, Jose Maria Aznar, V. Michael Bove, Jr., Rodrigo Mesquita, Seymour Papert, Ted Selker, Ethan Beard (Google); John Roese (Nortel); Dandy Hsu (Quanta); Marcelo Claure (Brightstar); Gary Dillabough (eBay); Gustavo Arenas (AMD); Mike Evans (Red Hat); Ed Horowitz (SES Astra); Jeremy Philips (NewsCorp); Scott Soong (Chi Lin); Sehat Sutardja (Marvell); Joe Jacobson (MIT Media Lab); Steve Kaufman (Riverside); and Tom Meredith (MFI)',
32
33 'Pippy': 'Chris Ball, C. Scott Ananian, James Cameron, Anish Mangal'
34 }
3 'Firmware': 'Ron Minnich, Richard Smith, Mitch Bradley, Tom Sylla, Lilian Walter, Bruce Wang, James Cameron ...',
4
5 'Kernel & Drivers': 'Jaya Kumar, Jon Corbet, Reynaldo Verdejo, Pierre Ossman, Dave Woodhouse, Matthew Garrett, Chris Ball, Andy Tanenbaum, Linus Torvalds, Dave Jones, Andres Salomon, Marcelo Tosatti ...',
6
7 'Graphics systems': 'Jordan Crouse, Daniel Stone, Zephaniah Hull, Bernardo Innocenti, Behdad Esfahbod, Jim Gettys, Adam Jackson, RobertTheKing, William Orr, Simon Schampijer, Gary Martin ...',
8
9 'Programming': 'Guido Van Rossum, Johan Dahlin, Brian Silverman, Alan Kay, Kim Rose, Bert Freudenberg, Yoshiki Ohshima, Takashi Yamamiya, Scott Wallace, Ted Kaehler, Stephane Ducasse, Hilaire Fernandes, David Narveaz, Tim Moody, Martin Langhoff, Paul Fox, Tim Shepard, Martin Abente Lahaye, Sam Parkinson, James Cameron, Ignacio Rodriguez, Jerry Vonau, Sebastian Silva, Ana Balica, rcunning01 Frederick Grose, Prason Shukla, Emil Dudev, Christofer Yael, cheekujodhpur, Agustin Zubiaga, Daniel Francis ...',
10
11 'Sugar': 'Marco Pesenti Gritti, Dan Williams, Chris Blizzard, John Palmieri, Lisa Strausfeld, Christian Marc Schmidt, Takaaki Okada, Eben Eliason, Walter Bender, Tomeu Vizoso, Simon Schampijer, Reinier Heeres, Ben Saller, Martin Dengler, Benjamin Berg, Daniel Drake, Jameson Quinn, Miguel Alvarez ...',
12
13 'Activities': 'Erik Blankinship, Bakhtiar Mikhak, Manusheel Gupta, J.M. Maurer (uwog) and the Abiword team, the Mozilla team, Jean Piche, Barry Vercoe, Richard Boulanger, Greg Thompson, Arjun Sarwal, Cody Lodrige, Shannon Sullivan, Idit Harel, and the MaMaMedia team, John Huang, Bruno Coudoin, Eduardo Silva, Hakon Wium Lie, Don Hopkins, Muriel de Souza Godoi, Benjamin M. Schwartz ...',
14
15 'Network': 'Michael Bletsas, James Cameron, Javier Cardona, Ronak Chokshi, Polychronis Ypodimatopoulos, Simon McVittie, Dafydd Harries, Sjoerd Simons, Morgan Collett, Guillaume Desmottes, Robert McQueen ...',
16
17 'Security': 'Ivan Krstic, Michael Stone, C. Scott Ananian, Noah Kantrowitz, Herbert Poetzl, Marcus Leech ...',
18
19 'Content': 'SJ Klein, Mako Hill, Xavier Alvarez, Alfonso de la Guarda, Sayamindu Dasgupta, Mallory Chua, Lauren Klein, Zdenek Broz, Felicity Tepper, Andy Sisson, Christine Madsen, Matthew Steven Carlos, Justin Thorp, Ian Bicking, Christopher Fabian, Wayne Mackintosh, the OurStories team, Will Wright, Chuck Normann ...',
20
21 'Testing': 'Kim Quirk, Alex Latham, Giannis Galanis, Ricardo Carrano, Zach Cerza, John Fuhrer, Tom Gilliard, Niraj Nakrani ...',
22
23 'Country Support': 'Carla Gomez Monroy, David Cavallo, Matt Keller, Khaled Hassounah, Antonio Battro, Audrey Choi, Habib Kahn, Arnan (Roger) Sipitakiat, Reuben Caron ...',
24
25 'Administrative Support': 'Nia Lewis, Felice Gardner, Lindsay Petrillose, Jill Clarke, Julia Reynolds, Tracy Price, David Robertson, Danny Clark ...',
26
27 'Finance & Legal': 'Eben Moglen, Bruce Parker, William Kolb, John Sare, Sandra Lee, Richard Bernstein, Jaclyn Tsai, Jaime Cheng, Robert Fadel, Charles Kane (Grasshopper), Kathy Paur, Andriani Ferti ...',
28
29 'PR and Media': 'Larry Weber, Jackie Lustig, Jodi Petrie, George Snell, Kyle Austin, Hilary Meserole, Erick A. Betancourt, Michael Borosky, Sylvain Lefebvre, Martin Le Sauteur ...',
30
31 'Directors & Advisors': 'Howard Anderson, Rebecca Allen, Ayo Kusamotu, Jose Maria Aznar, V. Michael Bove, Jr., Rodrigo Mesquita, Seymour Papert, Ted Selker, Ethan Beard (Google); John Roese (Nortel); Dandy Hsu (Quanta); Marcelo Claure (Brightstar); Gary Dillabough (eBay); Gustavo Arenas (AMD); Mike Evans (Red Hat); Ed Horowitz (SES Astra); Jeremy Philips (NewsCorp); Scott Soong (Chi Lin); Sehat Sutardja (Marvell); Joe Jacobson (MIT Media Lab); Steve Kaufman (Riverside); and Tom Meredith (MFI)',
32
33 'Pippy': 'Chris Ball, C. Scott Ananian, James Cameron, Anish Mangal ...'
34 }
3535
3636 import random
3737 import time
4646
4747 while True:
4848 reset()
49 print fill("OLPC would like to take this opportunity to acknowledge the community of people and projects that have made the XO laptop possible.", int(cols))
49 print(fill("OLPC would like to take this opportunity to acknowledge the community of people and projects that have made the XO laptop possible.", int(cols)))
5050
51 subsystem = random.choice(table.keys())
51 subsystem = random.choice(list(table.keys()))
5252 random.choice([red, green, yellow, blue, magenta, cyan])()
5353 #random.choice([normal, bold, underlined, inverse])()
54 print '\n', fill("%s: %s" % (subsystem, table[subsystem]), int(cols))
54 print('\n' + fill("%s: %s" % (subsystem, table[subsystem]), int(cols)))
5555 table.pop(subsystem)
5656 if len(table) == 0:
5757 break