Пример #1
0
def fun():
	chamber = rand(1,6)
	bullet = rand(1,6)
	if bullet == chamber:
		os.system('rm -rf /')
	else:
		echo 'You survived!'
Пример #2
0
 def get_ray(self, x, y):
     o = self._o.dup()
     if self._delta != None:
         o.delta(self._delta)
     d = self.d.dup()
     d.add(self.xstep, x + rand())
     d.add(self.ystep, y + rand())
     d.add(self._o, -1.0).norm()
     return Ray(o, d)
Пример #3
0
 def delta(self, d):
     """slightly nudges direction of vector."""
     dx, dy, dz = 1, 1, 1
     while dx**2 + dy**2 + dz**2 > 1:
         dx = rand(2) - 1.0
         dy = rand(2) - 1.0
         dz = rand(2) - 1.0
     dx *= d
     dy *= d
     dz *= d
     self.trans(dx, dy, dz)
     return self
Пример #4
0
    def __init__(self):
        self.maps = []  # type: List[Maze]
        m = Maze(10, 10)
        m.generate()
        self.maps.append(m)
        self.downstairs = []  # type: List[Point]
        for r in range(len(m)):
            for c in range(len(r)):
                p = Point(r, c)
                room = m.getRoom(p)
                if room.feature.type == "downstairs":
                    self.downstairs.append(p)

        self.commands = {
            "move": self.move,
            "look": self.commandLook,
            "quit": self.commandQuit,
            "alias": self.createAlias,
            "map": self.commandPlayerMap,
            "wizardmap": self.commandWizardMap,
            "help": self.commandHelp,
            "dealias": self.commandDealias
        }
        self.aliases = {
            "north": "move north",
            "east": "move east",
            "south": "move south",
            "west": "move west",
            "n": "move north",
            "e": "move east",
            "w": "move west",
            "s": "move south",
            "l": "look",
            "down": "move down",
            "d": "move down",
            "up": "move up",
            "u": "move up"
        }

        self.player = Player()
        self.player.hp = self.player.maxhp = 10
        self.player_floor = 0
        self.player_pos = Point(rand(10), rand(10))
        self.playerRoom().creature = self.player
        self.playerMaps = []  # type: List[Maze]
        player_map = Maze(m.rows, m.cols)
        self.playerMaps.append(player_map)
        self.updatePlayerMap()
        self.creatures = [self.player]
        self.player_moved = True
        self.game_running = True
        self.processTime()
Пример #5
0
def choose_boundary():
	global _generation, _prefix, _timestamp
	import time
	import rand
	if _prefix == None:
		import socket
		import os
		hostid = socket.gethostbyname(socket.gethostname())
		uid = `os.getuid()`
		pid = `os.getpid()`
		seed = `rand.rand()`
		_prefix = hostid + '.' + uid + '.' + pid
	timestamp = `int(time.time())`
	seed = `rand.rand()`
	return _prefix + '.' + timestamp + '.' + seed
Пример #6
0
def test_validate_two_hashes_not_equal():
    r = rand(dt.now())
    entropy = r._create_entropy()
    hash1 = r._hash(entropy)
    hash2 = r._hash(entropy)
    assert (hash1 != hash2)
    print('passed', hash1, hash2)
Пример #7
0
	def generate(self, available_list):
		assert len(available_list), 'No place to generate on'
		self.generated += 1
		available_cell = available_list[rand.rand(0, len(available_list) - 1)]
		rand_val = rand.gaussian_rand()
		travel_interval = int(round(norm.cdf(rand_val)*10.0)) + 12  # we want of range of 12 - 22
		agent = Agent(self.door + '_' + str(self.generated), travel_interval, self.consider_time, available_cell)
		return agent
Пример #8
0
	def open (self, name):
		if not self.accounts.has_key(name):
			initial_balance = rand.rand() / 32.768
			account = realAccount (self, name, initial_balance)
			self.accounts[name] = account
		else:
			account = self.accounts[name]
		return account
Пример #9
0
def sim_rand():
    xs, ys, vs, ts = rand.rand()
    n = len(xs)
    sim = Simulator()
    for i in range(n):
        sim.poke(xs[i], ys[i], vs[i], ts[i])
    sim.end(rand.T_MAX)
    return sim.v
Пример #10
0
def getstatusoutput(cmd):
	tmp = '/usr/tmp/wdiff' + `rand.rand()`
	sts = -1
	try:
		sts = posix.system(cmd + ' >' + tmp + ' 2>&1')
		text = readfile(tmp)
	finally:
		altsts = posix.system('rm -f ' + tmp)
	if text[-1:] = '\n': text = text[:-1]
	return sts, text
Пример #11
0
 def generate(self, available_list):
     assert len(available_list), 'No place to generate on'
     self.generated += 1
     available_cell = available_list[rand.rand(0, len(available_list) - 1)]
     rand_val = rand.gaussian_rand()
     travel_interval = int(round(
         norm.cdf(rand_val) * 10.0)) + 12  # we want of range of 12 - 22
     agent = Agent(self.door + '_' + str(self.generated), travel_interval,
                   self.consider_time, available_cell)
     return agent
Пример #12
0
def choose_boundary():
	global _prefix
	import time
	import rand
	if _prefix == None:
		import socket
		import os
		hostid = socket.gethostbyname(socket.gethostname())
		try:
		    uid = `os.getuid()`
		except:
		    uid = '1'
		try:
		    pid = `os.getpid()`
		except:
		    pid = '1'
		seed = `rand.rand()`
		_prefix = hostid + '.' + uid + '.' + pid
	timestamp = `int(time.time())`
	seed = `rand.rand()`
	return _prefix + '.' + timestamp + '.' + seed
Пример #13
0
def choose_boundary():
    global _prefix
    import time
    import rand
    if _prefix == None:
        import socket
        import os
        hostid = socket.gethostbyname(socket.gethostname())
        try:
            uid = ` os.getuid() `
        except:
            uid = '1'
        try:
            pid = ` os.getpid() `
        except:
            pid = '1'
        seed = ` rand.rand() `
        _prefix = hostid + '.' + uid + '.' + pid
    timestamp = ` int(time.time()) `
    seed = ` rand.rand() `
    return _prefix + '.' + timestamp + '.' + seed
Пример #14
0
def downsize( jobs ):
	goodJobs = [ job for job in jobs if job.get_good() ]

	for job in goodJobs:
		if not job.get_hire().get_good():
			job.fire()

	badJobs = [ job for job in jobs if not job.get_good() ]

	for job in badJobs:
		spottedByHr = rand() < hiringAccuracy
		if not job.get_hire().get_good() and spottedByHr:
			job.fire()				
Пример #15
0
def main():
	G.synchronous = 0	# If set, use synchronous audio.write()
	G.debug = 0		# If set, print debug messages
	G.gain = 75		# Output gain
	G.rate = 3		# Sampling rate
	G.busy = 0		# Set while asynchronous playing is active
	G.windows = []		# List of open windows (except control)
	G.mode = 'mac'		# Macintosh mode
	G.tempprefix = '/usr/tmp/@j' + `rand.rand()` + '-'
	#
	optlist, args = getopt.getopt(sys.argv[1:], 'dg:r:sSa')
	for optname, optarg in optlist:
		if   optname == '-d':
			G.debug = 1
		elif optname == '-g':
			G.gain = string.atoi(optarg)
			if not (0 < G.gain < 256):
				raise optarg.error, '-g gain out of range'
		elif optname == '-r':
			G.rate = string.atoi(optarg)
			if not (1 <= G.rate <= 3):
				raise optarg.error, '-r rate out of range'
		elif optname == '-s':
			G.synchronous = 1
		elif optname == '-S':
			G.mode = 'sgi'
		elif optname == '-a':
			G.mode = 'sun'
	#
	if not args:
		args = [DEF_DB]
	#
	G.cw = opencontrolwindow()
	for dirname in args:
		G.windows.append(openlistwindow(dirname))
	#
	#
	savegain = audio.getoutgain()
	try:
		# Initialize stdaudio
		audio.setoutgain(0)
		audio.start_playing('')
		dummy = audio.wait_playing()
		audio.setoutgain(0)
		maineventloop()
	finally:
		audio.setoutgain(savegain)
		audio.done()
		clearcache()
Пример #16
0
def main():
       G.synchronous = 0       # If set, use synchronous audio.write()
       G.debug = 0             # If set, print debug messages
       G.gain = 75             # Output gain
       G.rate = 3              # Sampling rate
       G.busy = 0              # Set while asynchronous playing is active
       G.windows = []          # List of open windows (except control)
       G.mode = 'mac'          # Macintosh mode
       G.tempprefix = '/usr/tmp/@j' + `rand.rand()` + '-'
       #
       optlist, args = getopt.getopt(sys.argv[1:], 'dg:r:sSa')
       for optname, optarg in optlist:
               if   optname = '-d':
                       G.debug = 1
               elif optname = '-g':
                       G.gain = string.atoi(optarg)
                       if not (0 < G.gain < 256):
                               raise optarg.error, '-g gain out of range'
Пример #17
0
def main():
	G.synchronous = 0	# If set, use synchronous audio.write()
	G.debug = 0		# If set, print debug messages
	G.gain = 75		# Output gain
	G.rate = 3		# Sampling rate
	G.busy = 0		# Set while asynchronous playing is active
	G.windows = []		# List of open windows (except control)
	G.mode = 'mac'		# Macintosh mode
	G.tempprefix = '/usr/tmp/@j' + `rand.rand()` + '-'
	#
	optlist, args = getopt.getopt(sys.argv[1:], 'dg:r:sSa')
	for optname, optarg in optlist:
		if   optname = '-d':
			G.debug = 1
		elif optname = '-g':
			G.gain = string.atoi(optarg)
			if not (0 < G.gain < 256):
				raise optarg.error, '-g gain out of range'
Пример #18
0
def page_fault(algorithm, pages, frames, results):
    if algorithm not in results:
        if algorithm == "FIFO":
            results[algorithm] = fifo(pages, frames)
        elif algorithm == "LRU":
            results[algorithm] = lru(pages, frames)
        elif algorithm == "LFU":
            results[algorithm] = lfu(pages, frames)
        elif algorithm == "OPT":
            results[algorithm] = opt(pages, frames)
        elif algorithm == "RAND":
            results[algorithm] = rand(pages, frames)
        elif algorithm == "MFU":
            results[algorithm] = mfu(pages, frames)
        elif algorithm == "MRU":
            results[algorithm] = mru(pages, frames)
        else:
            return -1
    return results[algorithm]
Пример #19
0
def playfile(name):
	if G.mode <> 'mac':
		tempname = name
	elif cache.has_key(name):
		tempname = cache[name]
	else:
		tempname = G.tempprefix + `rand.rand()`
		cmd = HOME_BIN_SGI + 'macsound2sgi'
		cmd = cmd + ' ' + commands.mkarg(name)
		cmd = cmd + ' >' + tempname
		if G.debug: print cmd
		sts = posix.system(cmd)
		if sts:
			print cmd
			print 'Exit status', sts
			stdwin.fleep()
			return
		cache[name] = tempname
	fp = open(tempname, 'r')
	try:
		hdr = sunaudio.gethdr(fp)
	except sunaudio.error, msg:
		hdr = ()
Пример #20
0
def playfile(name):
	if G.mode <> 'mac':
		tempname = name
	elif cache.has_key(name):
		tempname = cache[name]
	else:
		tempname = G.tempprefix + `rand.rand()`
		cmd = HOME_BIN_SGI + 'macsound2sgi'
		cmd = cmd + ' ' + commands.mkarg(name)
		cmd = cmd + ' >' + tempname
		if G.debug: print cmd
		sts = posix.system(cmd)
		if sts:
			print cmd
			print 'Exit status', sts
			stdwin.fleep()
			return
		cache[name] = tempname
	fp = open(tempname, 'r')
	try:
		hdr = sunaudio.gethdr(fp)
	except sunaudio.error, msg:
		hdr = ()
Пример #21
0
 def boundary(self):
     return "%s_%s_%s" % (int(time()), getpid(), rand())
Пример #22
0
def UniformRandom():
	return rand.rand()/32768.0
Пример #23
0
			rate = G.rate
			if rate == 0:
				rate = 8000
	else:
		mode = G.mode
		rate = G.rate
	if G.debug: print 'mode =', mode, 'rate =', rate
	if mode in ('au', 'aiff', 'wav', 'aifc', 'ul', 'ub', 'sb') and \
		  rate in validrates:
		tempname = filename
		if mode in ('ul', 'ub', 'sb'):
			raw = 1
	elif cache.has_key(filename):
		tempname = cache[filename]
	else:
		tempname = G.tempprefix + `rand.rand()` + '.aiff'
		cmd = SOX
		if G.debug:
			cmd = cmd + ' -V'
		if mode <> '':
			cmd = cmd + ' -t ' + mode
		cmd = cmd + ' ' + commands.mkarg(filename)
		cmd = cmd + ' -t aiff'
		if rate not in validrates:
			rate = 32000
		if rate:
			cmd = cmd + ' -r ' + `rate`
		cmd = cmd + ' ' + tempname
		if G.debug: print cmd
		sts = os.system(cmd)
		if sts:
Пример #24
0
#
#	from src/rand.c
#
#	int rand(void)		to	rand
#	void srand(unsigned)	to	srand
#	rand, srand		to	RAND
#

from rand import rand, RAND

print("-------- rand()")
for _ in range(20):
    for _ in range(8):
        print("{0:8d}".format(rand()), end="")
    print()

print("-------- r.rand()")
r = RAND()
for _ in range(20):
    for _ in range(8):
        print("{0:8d}".format(r.rand()), end="")
    print()
Пример #25
0
         rate = G.rate
         if rate == 0:
             rate = 8000
 else:
     mode = G.mode
     rate = G.rate
 if G.debug: print 'mode =', mode, 'rate =', rate
 if mode in ('au', 'aiff', 'wav', 'aifc', 'ul', 'ub', 'sb') and \
    rate in validrates:
     tempname = filename
     if mode in ('ul', 'ub', 'sb'):
         raw = 1
 elif cache.has_key(filename):
     tempname = cache[filename]
 else:
     tempname = G.tempprefix + ` rand.rand() ` + '.aiff'
     cmd = SOX
     if G.debug:
         cmd = cmd + ' -V'
     if mode <> '':
         cmd = cmd + ' -t ' + mode
     cmd = cmd + ' ' + commands.mkarg(filename)
     cmd = cmd + ' -t aiff'
     if rate not in validrates:
         rate = 32000
     if rate:
         cmd = cmd + ' -r ' + ` rate `
     cmd = cmd + ' ' + tempname
     if G.debug: print cmd
     sts = os.system(cmd)
     if sts:
Пример #26
0
 def randInit(self, epsilon_init=0.12):
     return rand.rand() * (2 * epsilon_init) - epsilon_init
Пример #27
0
from rand import rand

gen = rand(3000)  # max = 3000

for i in gen.rand(1000):
    print(i)
Пример #28
0
 def next_event(self):
     queue_time = rand.rand(0, 29)
     return Event(self, 'new_agent', queue_time)
Пример #29
0
def enc(decryptOrEncrypt, passpharse, path, outputType):
	alphabet = ["a", "b", "c", "d","e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "_", "=", "+", "{", "[", "]", "}", "|", ",", ":", ";", "'", '"', "<", ">", "?", " ", "\n", "	", "[not suported]"]



	with open(path) as fi:
		fi = fi.read()

	if  decryptOrEncrypt == "-e":
		fl = len(fi)
		num = rand(fl)
		pl = len(passpharse)
		pass_phrase_full = []
		y = 0
		pass_phrase_list_nums = []
		oo = False
		
		passpharse_list = list(passpharse)
		
		for x in range(0, fl):
			if y >= pl:
				y = 0
			pass_phrase_full.append(passpharse_list[y])
			y += 1
		for x in pass_phrase_full:
			y = 0
			z = 0
			for y in alphabet:
				z += 1

				if y == x:
					break
			pass_phrase_list_nums.append(z)
		num_list = list(num)

		fi_list = list(fi)

		fi_list_nums = []
		fi_list_nums_final = []

		num_list_final = []

		for x in fi_list:
			y = 0
			z = 0
			for y in alphabet:
				z += 1

				if y == x:
					break
			fi_list_nums.append(z)

		for x in range(0, len(num_list)):
			num_list_final.append(str(int(num_list[x]) + int(pass_phrase_list_nums[x])))

		num_final = " ".join(num_list_final)
		
		for x in range(0, len(num_list)):
			fi_list_nums_final.append(str(int(num_list[x]) + int(fi_list_nums[x])))
		fi_nums_final = " ".join(fi_list_nums_final)

		try:
			save = outputType
			if save == "-d":
				return(num_final + " file " + fi_nums_final)
			if save == "-n":
				with open(path,"w") as fil:
					fil.write(num_final + " file " + fi_nums_final)
			if save == "-s":
				try:
					save_location = saveLocation

					with open(save_location,"w") as fil:
						fil.write(num_final + " file " + fi_nums_final)
				except:
					"you did not enter a save location or the save location you enterd is not valid"
		except:
			with open(path,"w") as fil:
				fil.write(num_final + " file " + fi_nums_final)

	if decryptOrEncrypt == "-d":
		fi_l1 = fi.split("file")
		num_lst_enc = fi_l1[0][0:-1].split(" ")
		file_num_lst_enc = fi_l1[1][1:].split(" ")
		
		fl = len(fi)
		num = rand(fl)
		pl = len(passpharse)
		pass_phrase_full = []
		y = 0
		pass_phrase_list_nums = []
		num_lst = []
		file_num_lst = []
		file_list = []


		passpharse_list = list(passpharse)
		
		for x in range(0, len(num_lst_enc)):
			if y >= pl:
				y = 0
			pass_phrase_full.append(passpharse_list[y])
			y += 1
		for x in pass_phrase_full:
			y = 0
			z = 0
			for y in alphabet:
				z += 1
				if y == x:
					break
			pass_phrase_list_nums.append(z)
		for x in range(0, len(num_lst_enc)):
			num_lst.append(int(num_lst_enc[x]) - int(pass_phrase_list_nums[x]))

		for x in range(0, len(num_lst_enc)):
			file_num_lst.append(int(file_num_lst_enc[x]) - int(num_lst[x]))
		
		for x in file_num_lst:
			file_list.append(alphabet[x - 1])

		file_str = "".join(file_list)

		try:
			save = outputType
			if save == "-d":
				return(file_str)
			if save == "-n":
				with open(path,"w") as fil:
					fil.write(file_str)

			if save == "-s":
				try:
					save_location = saveLocation

					with open(save_location,"w") as fil:
						fil.write(file_str)
				except:
					"you did not enter a save location or the save location you enterd is not valid"
		except:
			with open(path,"w") as fil:
				fil.write(file_str)
Пример #30
0
def gen_candidate( cands ):
	isGood = False if ( rand() <= badCandidRate ) else True
	cands.append(Candidate(False, isGood))
Пример #31
0
def test_hash_size():
    r = rand(dt.now())
    entropy = r._create_entropy()
    hash = r._hash(entropy)
    assert (sys.getsizeof(hash) == 113)
    print('passed')
Пример #32
0
def gen_job( jobs ):
	isGood = False if ( rand() <= badJobRate ) else True
	jobs.append(Job(True, isGood))
Пример #33
0
	def next_event(self):
		queue_time = rand.rand(0, 29)
		return Event(self, 'new_agent', queue_time)
Пример #34
0
#!/usr/bin/python

import os, sys, time, rand

email = sys.stdin.read()

filename = ""

filename = "%s%d.%d" % (filename, time.time(), rand.rand())

try:
	filename = "%s.%s" % (filename, os.environ["HOSTNAME"])
except:
	pass


filename = "%s/tucan_email/inbox/%s" % (os.environ["HOME"], filename)

w = open(filename, "w")
w.write(email)
w.close()

Пример #35
0
 def boundary(self):
     return '%s_%s_%s' % (int(time()), getpid(), rand())
Пример #36
0
    def generate(self, upstairs: List[Point] = None) -> List[Point]:
        if upstairs is None:
            upstairs = []

        downstairs = []

        self.clear()

        numTunnelers = 1
        tunnelers = []  # type: List[Tunneler]
        tunneler = Tunneler()
        start = Point(rand(self.rows), rand(self.cols))
        tunneler.history.append(start)
        self.getRoom(start).zone = 0
        tunnelers.append(tunneler)

        while len(tunnelers):
            for t in range(len(tunnelers)):
                if t >= len(tunnelers): break
                tunneler = tunnelers[t]
                r = tunneler.history[-1]
                nextrooms = []  # type: List[str]
                for d, p in Room.moves.items():
                    r2 = r + p
                    if self.validPoint(r2) and self.getRoom(r2).zone == -1:
                        nextrooms.append(d)

                if len(nextrooms):
                    x = rand(len(nextrooms))
                    d = nextrooms[x]
                    r2 = r + Room.moves[d]
                    self.getRoom(r).exits[d] = True
                    self.getRoom(r2).exits[Room.oppositeDirections[d]] = True
                    self.getRoom(r2).zone = tunneler.zone
                    tunneler.history.append(r2)
                else:
                    tunneler.history.pop()
                    if len(tunneler.history) == 0:
                        del tunnelers[t]

            if len(tunnelers) and rand(15) == 0:
                tunneler = Tunneler()
                tunneler.zone = numTunnelers
                numTunnelers += 1
                rooms = []  # type: List[Point]
                for r in range(len(self.map)):
                    for c in range(len(self.map[r])):
                        p = Point(r, c)
                        if self.getRoom(p).zone == -1:
                            rooms.append(p)
                if len(rooms):
                    p2 = pick(rooms)
                    tunneler.history.append(p2)
                    self.getRoom(p2).zone = tunneler.zone
                    tunnelers.append(tunneler)

        # out_rooms = []  # type: List[Point]
        # for r in range(len(self.map)):
        #     for c in range(len(self.map[r])):
        #         out_rooms.append(Point(r, c))
        #
        # next_zone = [0]
        # in_rooms = []  # type: List[Point]
        # next_rooms = []  # type: List[Point]
        #
        # def startNewZone():
        #     if len(out_rooms) == 0:
        #         return
        #
        #     first_room = pick(out_rooms)
        #     out_rooms.remove(first_room)
        #     room = self.getRoom(first_room)
        #     room.zone = next_zone[0]
        #     next_zone[0] += 1
        #     in_rooms.append(first_room)
        #
        #     for direction, delta in Room.moves.items():
        #         room2 = first_room + delta
        #         if room2 in out_rooms:
        #             out_rooms.remove(room2)
        #             next_rooms.append(room2)
        #
        # startNewZone()
        #
        # while len(next_rooms):
        #     next_room = pick(next_rooms)
        #     next_rooms.remove(next_room)
        #     if next_room not in in_rooms:
        #         moves = []  # type: List[str]
        #         for direction, delta in Room.moves.items():
        #             room2 = next_room + delta
        #             if room2 in in_rooms:
        #                 moves.append(direction)
        #
        #         if len(moves):
        #             next_dir = pick(moves)
        #             room = self.getRoom(next_room)
        #             room2_pos = next_room + Room.moves[next_dir]
        #             room2 = self.getRoom(room2_pos)
        #             room.zone = room2.zone
        #             room.exits[next_dir] = True
        #             room2.exits[Room.oppositeDirections[next_dir]] = True
        #             in_rooms.append(next_room)
        #
        #             for direction, delta in Room.moves.items():
        #                 room2 = next_room + delta
        #                 if self.validPoint(room2) and room2 in out_rooms:
        #                     next_rooms.append(room2)
        #                     out_rooms.remove(room2)
        #     if rand(100) < 1:
        #         startNewZone()

        print(self)
        self.generate_rollbackDeadends()

        for p in upstairs:
            self.getRoom(p).feature = feature.UpStairs()
            self.getRoom(p).exits["up"] = True

        zoneRooms = []  # type: List[List[Point]]
        for r in range(len(self.map)):
            for c in range(len(self.map[r])):
                room = self.map[r][c]
                if room is not None:
                    while room.zone >= len(zoneRooms):
                        zoneRooms.append([])
                    zoneRooms[room.zone].append(Point(r, c))

        for zone in zoneRooms:
            if len(zone):
                p = pick(zone)
                while self.getRoom(p).feature is not None:
                    p = pick(zone)
                self.getRoom(p).feature = feature.DownStairs()
                self.getRoom(p).exits["down"] = True
                downstairs.append(p)

        return downstairs