From 10c505dd2e7a890e3fcd4570c818fb2812fedbdf Mon Sep 17 00:00:00 2001 From: erks Date: Sun, 2 Dec 2012 05:00:20 -0800 Subject: [PATCH] Replace True to False in CompileTimeTest --- CompileTimeTest.py | 11 +++++++++-- CompileTimeTest.py~ | 9 +++++++-- DS.pyc | Bin 556 -> 512 bytes SmartDataStructure.pyc | Bin 6295 -> 5921 bytes arr.pyc | Bin 1780 -> 1604 bytes bst.pyc | Bin 1581 -> 1427 bytes btree.pyc | Bin 12843 -> 12161 bytes graph_test.py | 27 ++++++++++++++++----------- maxheap.pyc | Bin 1559 -> 1405 bytes minheap.pyc | Bin 1870 -> 1716 bytes sarr.pyc | Bin 2368 -> 2170 bytes 11 files changed, 32 insertions(+), 15 deletions(-) diff --git a/CompileTimeTest.py b/CompileTimeTest.py index 0130211..5b01803 100755 --- a/CompileTimeTest.py +++ b/CompileTimeTest.py @@ -34,10 +34,17 @@ print "Fastest is %d" % (minIndex) -#rename fastest .py to *_optimized.py +#create *_optimized.py with SD set to False +file = open(testFileName + "_optimized.py", "w") fastestFileName = str(testFileName + "_T" + str(minIndex) + ".py") -os.rename(fastestFileName, testFileName + "_optimized.py") +for line in fileinput.input(fastestFileName): + line = line.replace("SD(TRUE", "SD(FALSE") + file.write(line) + +file.close() + +#remove temp testing files for filename in os.listdir("."): if filename.startswith(testFileName + "_T"): os.remove(filename) diff --git a/CompileTimeTest.py~ b/CompileTimeTest.py~ index 0130211..bdbc87a 100755 --- a/CompileTimeTest.py~ +++ b/CompileTimeTest.py~ @@ -34,10 +34,15 @@ minIndex, minValue = min(enumerate(dataStructureTimes), key=operator.itemgetter( print "Fastest is %d" % (minIndex) -#rename fastest .py to *_optimized.py +#create *_optimized.py with SD set to False +file = open(testFileName + "_optimized.py", "w") fastestFileName = str(testFileName + "_T" + str(minIndex) + ".py") -os.rename(fastestFileName, testFileName + "_optimized.py") +for line in fileinput.input(fastestFileName): + line = line.replace("SD(TRUE", "SD(FALSE") + file.write(line) + +#remove temp testing files for filename in os.listdir("."): if filename.startswith(testFileName + "_T"): os.remove(filename) diff --git a/DS.pyc b/DS.pyc index 2cd63220ed50593ae039085c6c586198027b67fc..23e9ed1bbc7022a414c2b8260969f6df2f6187c4 100644 GIT binary patch delta 78 zcmZ3((!j#X{F#^Q+D2AaMoB#e1_u3%{M=Oi)S~QSeV5eY?2`Nf{o<6#e;FkwPhzye Ht3n?DpXC_| delta 94 zcmZo*S;NB0{F#?aZ6m8IqqGYH1A~5OacWVqepzBsXd0 NQgU()qYY6i^#MQ`9yb60 diff --git a/SmartDataStructure.pyc b/SmartDataStructure.pyc index f87776cef780663bf05e24eea5df5d53dcd57795..57e8c03250360fc158bd47e3ca32a83e7d690a28 100644 GIT binary patch delta 667 zcmbPkxKNLc`7>$u4XMiBJ{CevAlJwHzA=s@g$Nh1leJE@D*mbDt*4EY``}c~%mkatH4b zqEzuse#93_gvx&Y8-!JD-Y;;4k)Sg1&2NN)nFuSJJVSH|5vrz&Eha+MMDY%Ss>CK2 HN~i$K|%mh{^I diff --git a/arr.pyc b/arr.pyc index f6067de3f42264c64c924ed1a1c5fc710bb25f27..9c696a46bddd97df9de89f637671da26fe62a229 100644 GIT binary patch delta 283 zcmeyudxVFL`7%K%~lDtoB5yl$xx= GCIJ9sA8x<^ diff --git a/bst.pyc b/bst.pyc index 09f04b908af71a97bf63fd65b2704b515b98ee6a..6444336b1c86ff53a251f181e70a8fb9e69671b8 100644 GIT binary patch delta 281 zcmZ3>Gnt!>`706|qCvsfnIV96n`RcbI55v5Xk@;RnLqEt#vE@D1FluGHzX)Faqsg#<`$!brON+SSvZ(wTx diff --git a/btree.pyc b/btree.pyc index d3d2a1036d95e85589ef1bd56adbf8521c69f020..62a6ec2ed8f5362249a8b9cc5d74080ad4ae7e13 100644 GIT binary patch delta 1083 zcmZ3T(iqRi{F#?a@A^hIXC_HQ1_lQGjQreG{nVoDVttp?;_Q|aytSz{j zfFX)Pvk19_P2?^CL-a&72^g|@k(e|gB^(k52`Legk|5;ea+wAKu62^NA!N@+9SKUO0|TLA(rZ%xDDC7Q9YQD0sfl4 xxD5d2E}6;CHUHsNp}5&p`w#(ZHaqE_A{4*j2J7+KBQrVBFdwf9#mNFj(g41`Vk`gv delta 1319 zcmZpSU!B6n{F#@F>B2@fXC`TP1_lQG(BjmhV*RqjqSCyg#8Q2i)Z*-t{DR4X(!z|z zlNYM0Om1WPN|Z|F&D)uC8HrH(QBHPq6zf)E>=%@l-R#Qoi#Vlmm;TN7({h-?cnN|?e6x@h05R^o^6g7!dI{BqiIZ^h@Zl0!G zLad<= xmax: - ax.set_xlim(xmax, xmax + window) - ax.figure.canvas.draw() + if t >= xmax1: + ax1.set_xlim(xmax1, xmax1 + window) + ax1.figure.canvas.draw() line.set_data(xdata, ydata) return line, @@ -53,6 +54,10 @@ def run(data): while 1: ops = randint(0, 100) + get = randint(0, 100) + add = randint(0, 100) + remove = randint(0, 100) + contains = randint(0, 100) time.sleep(0.2) diff --git a/maxheap.pyc b/maxheap.pyc index 5fe8b3b9b8523128f9be7163bdc69f648a5aa8b5..e373eb0fde63e6bc04e048ec9542f4b836b88ab2 100644 GIT binary patch delta 249 zcmbQv^OuW_`7OA1L#h<$*bAy@T!oXY|btY0HViCH2?qr delta 401 zcmdnOdybEd`7E}l8pME3=9nVp~b01#rkE5MWuN~iKY53sm0kP`33sHxrs$3 zE{P?H!6ikd$t9&lsl}7)*pw$nGfpQ{A?H(RoBlcQ02asz7t Usji%Sj!AB^I-4EI`s&!s06Za%Q2+n{ diff --git a/sarr.pyc b/sarr.pyc index f862a608c515d8c57c5267e660642fb7a51889bd..e9d3430dbf5b01c229bd5bfed0210da114a4f819 100644 GIT binary patch delta 315 zcmX>g^h0GttU{h6t5`b7ve1lGojeOCvUQVT Xq0Hn!_Dr($y=S*4L!b2IBn}AxcOJFC