403Webshell
Server IP : 118.27.122.120  /  Your IP : 216.73.217.32
Web Server : Apache
System : Linux web0216.sh.tyo1 4.18.0-553.141.2.lve.el7h.x86_64 #1 SMP Wed Jul 8 17:20:31 UTC 2026 x86_64
User : r4834334 ( 11094)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib64/python2.7/site-packages/meld3/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/python2.7/site-packages/meld3/testclone.py
import meld3
import time
import timeit

parent = meld3._MeldElementInterface('parent', {})
clonable = meld3._MeldElementInterface('root', {})
child1 = clonable.makeelement('child1', {})
child2 = clonable.makeelement('child2', {})
clonable.append(child1)
child1.append(child2)

for x in range(0, 10):
    new = child2.makeelement('tag%s'%x, {'x'+str(x):1})
    child2.append(new)

for x in range(0, 10):
    new = child1.makeelement('tag%s'%x, {'x'+str(x):1})
    child1.append(new)

NUM = 1000

def dotimeit(timer, name):
    repeat = 100
    number = 100
    result = timer.repeat(repeat, number)
    best = min(result)
    usec = best * 1e6 / number
    msec = usec / 1000
    print "%s best of %d: %.*g msec per loop" % (name, repeat, 8, msec)

t = timeit.Timer("meld3.chelper.clone(clonable, parent)",
                 "from __main__ import meld3, clonable, parent")
dotimeit(t, "C DF")

t = timeit.Timer("meld3.chelper.bfclone(clonable, parent)",
                 "from __main__ import meld3, clonable, parent")
dotimeit(t, "C BF")

t = timeit.Timer("meld3.pyhelper.clone(clonable, parent)",
                 "from __main__ import meld3, clonable, parent")
dotimeit(t, "Py DF")

t = timeit.Timer("meld3.pyhelper.bfclone(clonable, parent)",
                 "from __main__ import meld3, clonable, parent")
dotimeit(t, "Py BF")



Youez - 2016 - github.com/yon3zu
LinuXploit