Commit 598eee74 by Anselm Jia

Merge branch 'master' of mit.cs.uchicago.edu:ethanmertz/CS-123-Final

parents ff50a6a3 8dd9b6c0
......@@ -13,11 +13,9 @@ Python subdirectory: Contains the files used for our final Python analysis
-topvariables.py: Computes the least unique variable names.
-topvariables_intersection.py: Checks which variable files have the largest mean number of common variables with other files.
histogram.py: Used to construct the histograms for the report.
index.py: Creates the index file of tuples for the MapReduce jobs. Methodology detailed in the report.
plot_graph.py: Used to create the distance plot in the report.
plot_graph.py: Used to create the distance plot and histograms for the report.
runsim.sh: Used to send specific files for subset testing when there are other files in the directory so sending the entire directory is inefficient.
......
reEscape|s|return re.sub(r"([\(\)\[\]\.\*\+\?\{\}\^\$])", r"\\\1", s)
testOutfile2|self|self._TestOutFile(GTEST_OUTPUT_2_TEST, EXPECTED_XML_2)
reEscape|s|return re.sub(r"([\(\)\[\]\.\*\+\?\{\}\^\$])", r"\\\1", s)
_is_builtin_type|self, type|return type in [KW_INT, KW_CHAR, KW_BOOLEAN, KW_VOID]
rot|v|return [-v[3],v[0],v[1],v[2]]
rot|v|return [-v[3],v[0],v[1],v[2]]
rot|v|return [-v[3],v[0],v[1],v[2]]
cslogo||print '''
| ||||||||| `--------' | O ..
`\_,-------, ___@ PlayWeb ______|
/ XXXXXX /`| /
/ XXXXXX / `\ /
/ XXXXXX /\______(
/ XXXXXX /
/ XXXXXX /
(________( For example:
`------' cutescan.py yaseng.me
testShuffleChangesTestOrder|self|self.assert_(SHUFFLED_ALL_TESTS != ALL_TESTS, SHUFFLED_ALL_TESTS)
self.assert_(SHUFFLED_ACTIVE_TESTS != ACTIVE_TESTS, SHUFFLED_ACTIVE_TESTS)
self.assert_(SHUFFLED_FILTERED_TESTS != FILTERED_TESTS,
SHUFFLED_FILTERED_TESTS)
self.assert_(SHUFFLED_SHARDED_TESTS != SHARDED_TESTS,
SHUFFLED_SHARDED_TESTS)
testOutfile2|self|self._TestOutFile(GTEST_OUTPUT_2_TEST, EXPECTED_XML_2)
"pyfunctions/pyfile4868.txt" 0.45227296555961644
"pyfunctions/pyfile4867.txt" 0.4522679227959639
"pyfunctions/pyfile4832.txt" 0.4522656746303916
"pyfunctions/pyfile4829.txt" 0.45226564475591263
"pyfunctions/pyfile4824.txt" 0.45226410122512023
"pyfunctions/pyfile4863.txt" 0.4522573011096878
"pyfunctions/pyfile4838.txt" 0.4522560748014902
"pyfunctions/pyfile4834.txt" 0.4522548385799899
"pyfunctions/pyfile4835.txt" 0.45225150914007517
"pyfunctions/pyfile4861.txt" 0.45225105302079377
"pyfunctions/pyfile4860.txt" 0.4522489289211038
"pyfunctions/pyfile4841.txt" 0.4522444888611511
"pyfunctions/pyfile4842.txt" 0.45224308549564535
"pyfunctions/pyfile4843.txt" 0.45224184093524655
"pyfunctions/pyfile4859.txt" 0.4522410155894634
"pyfunctions/pyfile4844.txt" 0.4522400971609809
"pyfunctions/pyfile4858.txt" 0.45223796317899556
"pyfunctions/pyfile4847.txt" 0.45223450113225316
"pyfunctions/pyfile4857.txt" 0.45223323404196697
"pyfunctions/pyfile4856.txt" 0.4522317621550111
"pyfunctions/pyfile4848.txt" 0.45222745662516817
"pyfunctions/pyfile4906.txt" 0.4522019827167537
"pyfunctions/pyfile4908.txt" 0.45218356662435466
"pyfunctions/pyfile4911.txt" 0.4521704245413058
"pyfunctions/pyfile4913.txt" 0.4521553039190678
"pyfunctions/pyfile4914.txt" 0.4521493960651507
"pyfunctions/pyfile4915.txt" 0.45214908480809884
"pyfunctions/pyfile4921.txt" 0.4521346495527042
"pyfunctions/pyfile4920.txt" 0.4521314614444177
"pyfunctions/pyfile4923.txt" 0.45212348730652485
"pyfunctions/pyfile4925.txt" 0.4521197695543568
"pyfunctions/pyfile4926.txt" 0.45211943861521137
"pyfunctions/pyfile4930.txt" 0.45211726537407737
"pyfunctions/pyfile4932.txt" 0.4521118250319259
"pyfunctions/pyfile4934.txt" 0.4520934752908221
"pyfunctions/pyfile4941.txt" 0.45205912412055277
"pyfunctions/pyfile4944.txt" 0.45205748240145965
"pyfunctions/pyfile4948.txt" 0.45204049596370427
"pyfunctions/pyfile4953.txt" 0.45201664960202226
"pyfunctions/pyfile4962.txt" 0.45199147325765543
"pyfunctions/pyfile4963.txt" 0.4519804335074533
"pyfunctions/pyfile4967.txt" 0.45196019799633486
"pyfunctions/pyfile4876.txt" 0.45150183281781125
"pyfunctions/pyfile4864.txt" 0.45149932970866036
"pyfunctions/pyfile4754.txt" 0.4514613751084486
"pyfunctions/pyfile4839.txt" 0.4514448992923634
"pyfunctions/pyfile4761.txt" 0.45144126388551403
"pyfunctions/pyfile4782.txt" 0.45138747818913655
"pyfunctions/pyfile4833.txt" 0.4512999358397714
"pyfunctions/pyfile4929.txt" 0.4512406459859192
"pyfunctions/pyfile4965.txt" 0.4511234283827964
"pyfunctions/pyfile2307.txt" 0.45079337386427276
"pyfunctions/pyfile4412.txt" 0.45067075560742664
"pyfunctions/pyfile4319.txt" 0.45028930109106696
"pyfunctions/pyfile870.txt" 0.4502163493624254
"pyfunctions/pyfile4088.txt" 0.4498077713800801
"pyfunctions/pyfile4772.txt" 0.4497156135689474
"pyfunctions/pyfile4918.txt" 0.44942474461139764
"pyfunctions/pyfile1615.txt" 0.44924669150427277
"pyfunctions/pyfile1859.txt" 0.44923285970436144
"pyfunctions/pyfile4549.txt" 0.4491588985824687
"pyfunctions/pyfile4527.txt" 0.4491249089186674
"pyfunctions/pyfile626.txt" 0.44844625099652824
"pyfunctions/pyfile624.txt" 0.4450547594906591
"pyfunctions/pyfile4415.txt" 0.44456213486322615
"pyfunctions/pyfile1613.txt" 0.44389569788523214
"pyfunctions/pyfile1374.txt" 0.4431732735192146
"pyfunctions/pyfile385.txt" 0.4428557102193677
"pyfunctions/pyfile533.txt" 0.4394317874062247
"pyfunctions/pyfile4980.txt" 0.4390631651186325
"pyfunctions/pyfile1522.txt" 0.43896426638240316
"pyfunctions/pyfile4154.txt" 0.43851491087482514
"pyfunctions/pyfile4481.txt" 0.43621991369328056
"pyfunctions/pyfile4059.txt" 0.4346032631231313
"pyfunctions/pyfile4058.txt" 0.4344369954172888
"pyfunctions/pyfile2780.txt" 0.4341901711340027
"pyfunctions/pyfile3211.txt" 0.4297320963043031
"pyfunctions/pyfile4346.txt" 0.4268909575959104
"pyfunctions/pyfile4054.txt" 0.4250602972604692
"pyfunctions/pyfile4064.txt" 0.4250180057833518
"pyfunctions/pyfile4165.txt" 0.42498476989635076
"pyfunctions/pyfile4214.txt" 0.4249106096576094
"pyfunctions/pyfile604.txt" 0.42434023758717926
"pyfunctions/pyfile1593.txt" 0.42393750627413884
"pyfunctions/pyfile565.txt" 0.42150106423370126
"pyfunctions/pyfile4396.txt" 0.4213796008618865
"pyfunctions/pyfile1554.txt" 0.4213025729661326
"pyfunctions/pyfile4408.txt" 0.4161380800000597
"pyfunctions/pyfile4325.txt" 0.4152889804022673
"pyfunctions/pyfile1574.txt" 0.40956063055991926
"pyfunctions/pyfile4446.txt" 0.40942442841417825
"pyfunctions/pyfile585.txt" 0.4083175165091745
"pyfunctions/pyfile4352.txt" 0.4047567157733136
"pyfunctions/pyfile1026.txt" 0.4010799066543849
"pyfunctions/pyfile2085.txt" 0.3999315016261221
"pyfunctions/pyfile1596.txt" 0.3851350228321844
"pyfunctions/pyfile4399.txt" 0.3840959647592031
"pyfunctions/pyfile4402.txt" 0.38409378514112485
"pyfunctions/pyfile4405.txt" 0.3840740854745839
"pyfunctions/pyfile607.txt" 0.3838987731690707
import re
d = {}
with open("plot_graph.py") as p:
for line in p:
var = re.findall("[\s]*([\w, ]+)[\s]*=[^=]", line)
if var:
d[var[0].strip()] = d.get(var[0].strip(), 0) + 1
l = []
for item in d:
l.append((d[item], item))
nl = sorted(l)
for i in range(100):
print(nl[i])
import matplotlib.pyplot as plt
import numpy as np
import plotly.plotly as py # tools to communicate with Plotly's server
import plotly
plotly.tools.set_credentials_file(username='ravibakhai', api_key='IBBKlxSe6zkg0osw8RFz')
'''
Takes a list of integers and outputs a histogram
'''
numpy_hist = plt.figure()
plt.hist([1, 2, 1], bins=[0, 1, 2, 3])
plot_url = py.plot_mpl(numpy_hist, filename='numpy-bins')
\ No newline at end of file
File deleted
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment