Skip to content

Commit 2227fb1

Browse files
committed
Fix spaces.
1 parent 734d5d5 commit 2227fb1

28 files changed

Lines changed: 127 additions & 127 deletions

code/argtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
print 'Type:', type(sys.argv)
55

66
for arg in sys.argv:
7-
print 'Argument:', arg
7+
print 'Argument:', arg
88

code/curl3.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
# Don't overwrite the file
1313
if os.path.exists(fname) :
14-
if raw_input('Replace '+fname+' (Y/n)?') != 'Y' :
15-
print 'Data not copied'
16-
exit()
17-
print 'Replacing',fname
14+
if raw_input('Replace '+fname+' (Y/n)?') != 'Y' :
15+
print 'Data not copied'
16+
exit()
17+
print 'Replacing',fname
1818

1919
fhand = open(fname, 'w')
2020
size = 0

code/db2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
print 'Tracks:'
1313
cur.execute('SELECT title, plays FROM Tracks')
1414
for row in cur :
15-
print row
15+
print row
1616

1717
cur.execute('DELETE FROM Tracks WHERE plays < 100')
1818

code/geodata.zip

0 Bytes
Binary file not shown.

code/gmane.zip

0 Bytes
Binary file not shown.

code/old-twitter/twdump.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
cur.execute('SELECT * FROM Twitter')
66
count = 0
77
for row in cur :
8-
print row
9-
count = count + 1
8+
print row
9+
count = count + 1
1010
print count, 'rows.'
1111
cur.close()

code/old-twitter/twjoin.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@
77
count = 0
88
print 'People:'
99
for row in cur :
10-
if count < 5: print row
11-
count = count + 1
10+
if count < 5: print row
11+
count = count + 1
1212
print count, 'rows.'
1313

1414
cur.execute('SELECT * FROM Follows')
1515
count = 0
1616
print 'Follows:'
1717
for row in cur :
18-
if count < 5: print row
19-
count = count + 1
18+
if count < 5: print row
19+
count = count + 1
2020
print count, 'rows.'
2121

2222
cur.execute('''SELECT * FROM Follows JOIN People
2323
ON Follows.to_id = People.id WHERE Follows.from_id = 2''')
2424
count = 0
2525
print 'Connections for id=2:'
2626
for row in cur :
27-
if count < 5: print row
28-
count = count + 1
27+
if count < 5: print row
28+
count = count + 1
2929
print count, 'rows.'
3030

3131
cur.close()

code/pagerank.zip

1 Byte
Binary file not shown.

code/pagerank/spdump.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
cur = conn.cursor()
55

66
cur.execute('''SELECT COUNT(from_id) AS inbound, old_rank, new_rank, id, url
7-
FROM Pages JOIN Links ON Pages.id = Links.to_id
8-
WHERE html IS NOT NULL
9-
GROUP BY id ORDER BY inbound DESC''')
7+
FROM Pages JOIN Links ON Pages.id = Links.to_id
8+
WHERE html IS NOT NULL
9+
GROUP BY id ORDER BY inbound DESC''')
1010

1111
count = 0
1212
for row in cur :
13-
if count < 50 : print row
14-
count = count + 1
13+
if count < 50 : print row
14+
count = count + 1
1515
print count, 'rows.'
1616
cur.close()

code/pay3.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
try:
2-
inp = raw_input('Enter Hours: ')
3-
hours = float(inp)
4-
inp = raw_input('Enter Rate: ')
5-
rate = float(inp)
6-
if hours > 40:
7-
pay = hours * rate + (hours - 40) * rate * 1.5
8-
else:
9-
pay = hours * rate
10-
print 'Pay:', pay
2+
inp = raw_input('Enter Hours: ')
3+
hours = float(inp)
4+
inp = raw_input('Enter Rate: ')
5+
rate = float(inp)
6+
if hours > 40:
7+
pay = hours * rate + (hours - 40) * rate * 1.5
8+
else:
9+
pay = hours * rate
10+
print 'Pay:', pay
1111
except:
12-
print 'Error, please enter numeric input'
12+
print 'Error, please enter numeric input'

0 commit comments

Comments
 (0)