!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/lib/python2.4/site-packages/mx/Stack/   drwxr-xr-x
Free 3.73 GB of 27.03 GB (13.8%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     stackbench.py (2.39 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/local/bin/python -O
import time
import sys; sys.path.append('..')
import Stack
import UserStack
from sys import argv, exit

try:
    numtests, pushes, pops = eval(argv[1]), eval(argv[2]), eval(argv[3])
    assert pushes >= pops
except:
    print 'usage: stackbench.py <ntests> <pushes> <pops>, where <pushes> >= <pops>'
    exit(1)

def test(reps, func):
    start_cpu  = time.clock()
    for i in xrange(reps):
        x = func()
    return time.clock() - start_cpu

def method1():
    x = []                                           # built-in list
    push = x.append
    for i in range(pushes): push('spam'+'i')
    for i in range(pops):   top = x[-1]; del x[-1]

if 0:
    def method1a():
        x = []                                           # built-in list
        push = x.append
        for i in range(pushes): push('spam'+'i')
        for i in range(pops):   top = x.pop()

def method2():
    x = None                                         # built-in tuples
    for i in range(pushes): x = ('spam'+'i',x)
    for i in range(pops):   (top, x) = x

def method3():
    s = Stack.Stack()                              # Stack
    push = s.push
    pop = s.pop
    for i in range(pushes): push('spam'+'i')
    for i in range(pops):   top = pop()

def method3a():
    s = Stack.Stack()                              # Stack
    push = s.push
    for i in range(pushes): push('spam'+'i')
    t = s.pop_many(pops)                             # pop all at once

def method3b():
    s = Stack.Stack()                              # Stack
    push = s.push
    for i in range(pushes): s << ('spam'+'i')
    for i in range(pops):   top = s >> 1

def method3c():
    s = Stack.Stack()                              # Stack
    l = [''] * pushes
    for i in range(pushes): l[i] = ('spam'+'i')
    s.push_many(l)
    s.pop_many(pops)

def method4():
    s = UserStack.UserStack()                         # UserStack
    push = s.push
    pop = s.pop
    for i in range(pushes): push('spam'+'i')
    for i in range(pops):   top = pop()

print 'list: ', test(numtests, method1)            # run func 20 tests
print 'tuples:', test(numtests, method2)
print 'Stack (with push + pop):', test(numtests, method3)
print 'Stack (with push + pop_many):', test(numtests, method3a)
print 'Stack (with << + >>):', test(numtests, method3b)
print 'Stack (with push_many + pop_many):', test(numtests, method3c)
print 'UserStack:', test(numtests, method4)



:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0032 ]--