-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmotd.py
executable file
·66 lines (53 loc) · 1.5 KB
/
motd.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env python
# coding=utf8
import sys, math
def main():
banner()
anim()
def anim():
line = '~-__-~~-__-~~-__-~~-__-~~-__-~~-__-~~-__-~~-__-~~-__-~~-__-~~-__-~~-__-~~-__-~'
shifts = 6 ; reps = 6 ; start_delay = 4096 ; title_delay = 700 ; steps_per_shift = 2
pause(start_delay)
spaces = reps * shifts
step = 0 ; steps = reps * shifts * steps_per_shift ; bounce = 80
for i in range(0, reps):
for s in range(0, shifts):
out(' ' + line)
line = line[-1] + line[0:-1]
for s in range(0, steps_per_shift):
spaces = steps - step
title(' ' * spaces + 'haxlab.net')
pause(title_delay)
step += 1
spaces -= 1
cr()
clear()
def spow(b, p):
if b >= 0:
return math.pow(b, p)
else:
return -math.pow(-b, p)
def out(s):
sys.stdout.write(s)
def cr():
out('')
def clear():
out(' ' * 80) ; cr()
def banner():
print """
/~ ~\\
) | | /\ \ / | /\ |~~\ |\ | |~~ ~T~ (
< |--| (--) X | (--) |--< | \| |- | >
) | | | | / \ |__ | | |__/ * | | |__ | (
\_ _/
We are élite coders and hackers, creating simple brilliant technology
in the public domain. Hello and welcome to students, apprentices and masters!
Here is the place to work on dream projects, hone skills, build awesome stuff.
"""
def pause(n):
for i in range(0, n):
out(' ')
def title(s):
out(']0;%s' % s)
main()