Skip to content

Instantly share code, notes, and snippets.

@bethanylong
Created February 12, 2014 23:46
Show Gist options
  • Save bethanylong/8966919 to your computer and use it in GitHub Desktop.
Save bethanylong/8966919 to your computer and use it in GitHub Desktop.
Diagonal line generator (inspired by portsnap)
#!/usr/bin/env python
import sys
import time
for n in range(0, 10000):
try:
if n % 10 == 0:
sys.stderr.write(str(n))
time.sleep(0.01)
elif n % 2 == 0:
sys.stderr.write(".")
time.sleep(0.01)
except KeyboardInterrupt:
print
sys.exit(0)
@bethanylong
Copy link
Author

0....10....20....30....40....50....60....70....80....90....100....110....120...
.130....140....150....160....170....180....190....200....210....220....230....2
40....250....260....270....280....290....300....310....320....330....340....350
....360....370....380....390....400....410....420....430....440....450....460..
..470....480....490....500....510....520....530....540....550....560....570....
580....590....600....610....620....630....640....650....660....670....680....69
0....700....710....720....730....740....750....760....770....780....790....800.
...810....820....830....840....850....860....870....880....890....900....910...
.920....930....940....950....960....970....980....990....1000....1010....1020..
..1030....1040....1050....1060....1070....1080....1090....1100....1110....1120.
...1130....1140....1150....1160....1170....1180....1190....1200....1210....1220
....1230....1240....1250....1260....1270....1280....1290....1300....1310....132
0....1330....1340....1350....1360....1370....1380....1390....1400....1410....14
20....1430....1440....1450....1460....1470....1480....1490....1500....1510....1
520....1530....1540....1550....1560....1570....1580....1590....1600....1610....
1620....1630....1640....1650....1660....1670....1680....1690....1700....1710...
.1720....1730....1740....1750....1760....1770....1780....1790....1800....1810..
..1820....1830....1840....1850....1860....1870....1880....1890....1900....1910.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment