-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Koushik Roy
committed
Oct 10, 2012
1 parent
7579618
commit 00e2753
Showing
7 changed files
with
351 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
from collections import deque | ||
from collections import defaultdict | ||
import types | ||
|
||
class DataSet(object): | ||
def __init__(self, dataArr): | ||
self._data = dataArr | ||
|
||
def _getval(self, name): | ||
return sorted(map(lambda x: x.get(name), self._data)) | ||
|
||
def __getattr__(self, name): | ||
return self._getval(name) | ||
|
||
def __getitem__(self, name): | ||
return self._getval(name) | ||
|
||
def getGroup(self, attrName, groupVal): | ||
for i in xrange(len(self._data)): | ||
if self._data[i].get(attrName) == groupVal: | ||
return self._data[i] | ||
|
||
def getHistRepr(self, attrName): | ||
outHist = defaultdict(deque) | ||
for i in xrange(len(self._data)): | ||
assert self._data[i] is not None | ||
outHist[attrName].append(self._data[i][attrName]) | ||
return outHist | ||
|
||
class BinnedDataDict(dict): | ||
def __init__(self, dataArr): | ||
dict.__init__(self) | ||
self.setDataList(dataArr) | ||
|
||
def setDataList(self, dataArr): | ||
self._dataDict = defaultdict(int) | ||
self._totalItems = len(dataArr) | ||
for datum in dataArr: | ||
self._dataDict[datum] = self._dataDict[datum] + 1 | ||
|
||
def addItem(self, item): | ||
self._dataDict(item, self._dataDict[item] + 1) | ||
|
||
def setItem(self, attrName, attrVal): | ||
try: | ||
v = int(attrVal) | ||
self._dataDict[attrName] = v | ||
except TypeError: | ||
pass | ||
except ValueError: | ||
pass | ||
|
||
def ratio(self, attrName): | ||
fItems = self._totalItems + 0.0 | ||
assert fItems is FloatType, "fItems Float conversion failed" | ||
return len(self._dataDict[attrName]) / fItems | ||
|
||
def __getitem__(self, attrName): | ||
return self._dataDict.get(attrName, None) | ||
|
||
def __setitem__(self, attrName, attrVal): | ||
return self.setItem(attrName, attrVal) | ||
|
||
def __str__(self): | ||
return str(self._dataDict) | ||
|
||
def keys(self): | ||
return self._dataDict.keys() | ||
|
||
def values(self): | ||
return self._dataDict.values() | ||
|
||
def iteritems(self): | ||
for pair in self._dataDict.iteritems(): | ||
yield pair | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import sys, re | ||
import csv, json | ||
|
||
def main(): | ||
fname = sys.argv[1] | ||
f = open(fname) | ||
data_arr = [] | ||
courseReader = csv.reader(f, delimiter=',', quotechar='"') | ||
for split_line in courseReader: | ||
hours = re.sub('[^0-9-]*', '', split_line[4]) | ||
hours_list = map(lambda x: int(x), hours.split('-')) | ||
|
||
line_dict = {'time':split_line[0].lower(), 'major':split_line[1].lower(), 'grade':split_line[3].lower(), 'hours':hours_list, 'difficulty':split_line[5].lower()} | ||
data_arr.append(line_dict) | ||
|
||
f.close() | ||
|
||
out_f = open(sys.argv[2], 'w') | ||
json.dump(data_arr, out_f) | ||
out_f.close() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
4/22/2012 19:56:38,Computer Engineering,,Sophomore,0-3 hours,2,,Physics | ||
5/3/2012 16:22:28,Computer Engineering,,Sophomore,0-3 hours,2,,ECE 190 helps with logic | ||
5/3/2012 16:26:29,Computer Engineering,,Freshman,0-3 hours,2,,Doing robotics for 10 years.. | ||
5/3/2012 16:28:15,Electrical Engineering,,Sophomore,0-3 hours,2,,Physics E&M in HS | ||
5/3/2012 17:06:46,Electrical Engineering,,Freshman,4-7 hours,3,,basic physics | ||
5/3/2012 17:36:46,Electrical Engineering,,Junior,4-7 hours,2,,none | ||
5/3/2012 18:16:08,Computer Engineering,,Freshman,4-7 hours,3,This is a relatively easy course. Just do the assigned HW and readings and an A is pretty easy to get. This course isn't a good indication of the difficulty of future courses ECE though. ,"Physics E&M, a course in CS where I learnt Boolean algebra" | ||
5/3/2012 19:28:05,Computer Engineering,,Junior,4-7 hours,2,Strictly a weed-out class. Right when it gets interesting you move on to something else. Everything is very surface level.,None | ||
5/4/2012 14:57:27,Computer Engineering,,Sophomore,0-3 hours,4,,some of high school physics | ||
5/4/2012 14:59:40,General Engineering,,Freshman,8-11 hours,4,Very well prepared. Really wants their students to succeed.,None | ||
5/4/2012 15:00:35,Electrical Engineering,,Freshman,8-11 hours,5 - Very difficult,,none | ||
5/4/2012 15:00:51,Computer Engineering,,Freshman,4-7 hours,3,,None | ||
5/4/2012 15:02:22,Computer Science,,Sophomore,0-3 hours,1 - Very easy,,phys212 cs231 | ||
5/4/2012 15:02:40,General Engineering,,Junior,8-11 hours,4,,None | ||
5/4/2012 15:03:06,Computer Engineering,,Freshman,0-3 hours,2,The procedures in lab manual are not as detailed as I expected,Rhet105 | ||
5/4/2012 15:03:59,Electrical Engineering,,Freshman,0-3 hours,4,,none | ||
5/4/2012 15:05:44,Computer Science,,Freshman,0-3 hours,4,,Basic Math Skills and CS courses | ||
5/4/2012 15:07:56,General Engineering,,Freshman,4-7 hours,5 - Very difficult,Brunet's lectures were more helpful than Frizzel's ,N/A | ||
5/4/2012 15:09:07,Industrial Engineering,,Sophomore,4-7 hours,4,,High school | ||
5/4/2012 15:12:49,Computer Science,,Junior,0-3 hours,1 - Very easy,"CS231 rendered the second half of the class entirely moot. I did learn a lot in the EE-centric sections, as well as in coding and sampling, though.",CS231 | ||
5/4/2012 15:14:30,Electrical Engineering,,Freshman,8-11 hours,3,Very good course if you want to know if ECE is meant for you.,high school physics | ||
5/4/2012 15:22:21,General Engineering,,Freshman,4-7 hours,5 - Very difficult,Difficult!,Physics in High School | ||
5/4/2012 15:25:15,General Engineering,,Sophomore,12-15 hours,4,The lab is horrific,CS 125 | ||
5/4/2012 15:28:24,General Engineering,,Freshman,4-7 hours,3,"I think class quizzes are not the most fun, but would be very helpful to help access the students knowledge. For some of the sections in lecture I would understand it, but I could not apply it myself.",Math | ||
5/4/2012 15:30:17,Industrial Engineering,,Freshman,4-7 hours,3,,Physics E and M | ||
5/4/2012 15:40:36,General Studies,,Sophomore,0-3 hours,3,,AP Physics | ||
5/4/2012 15:45:47,Computer Engineering,,Freshman,8-11 hours,3,Great Course,None | ||
5/4/2012 15:46:16,Electrical Engineering,,Junior,0-3 hours,3,,Physics 212 | ||
5/4/2012 16:05:42,General Engineering,,Sophomore,8-11 hours,5 - Very difficult,"Frizzoli sucks at teaching... he uses overhead transparencies when he needs to figure out what a powerpoint is... need online notes with worked out problems... exams are much harder than the rest of the class material, also somewhat different type of questions which is unfair.",The labs really helped with the circuit for the car. | ||
5/4/2012 16:07:09,Philosophy,,Freshman,4-7 hours,3,,none | ||
5/4/2012 16:07:24,Computer Engineering,,Freshman,4-7 hours,3,"The exams were much harder than all of the professors said it would be, and they were also graded way too harshly considering the fact that this is a 100 level course. I agree that ECE should start being taught freshman year (i remember the debate), but I do think that it should not be near as stressful as it has been all semester.",AP Physics helped a little with circuit solving | ||
5/4/2012 16:07:35,Computer Engineering,,Freshman,0-3 hours,3,The lab portion is really unstructured interms of getting similar answers from different TAs,Some high school physics | ||
5/4/2012 16:08:57,General Engineering,,Freshman,4-7 hours,4,,2 years of electronics in high school | ||
5/4/2012 16:09:57,General Engineering,,Junior,4-7 hours,3,"I learned a lot in this course. It would have been very helpful to have taken this before Physics 212. I thought it was a little too much work for a 100-level class, but I did learn a lot about the course material. ",Physics 212 | ||
5/4/2012 16:20:19,Electrical Engineering,,Freshman,4-7 hours,3,,none | ||
5/4/2012 16:21:39,Electrical Engineering,,Sophomore,0-3 hours,2,"Great intro course with a variety of topics. Lab, despite being very long, is worthwhile and instills many basic circuit design skills.",High School AP Physics C (anything with basic circuit work) | ||
5/4/2012 16:22:10,Industrail ,,Sophomore,0-3 hours,3,"It is really hard too get an A in this class. | ||
There are so many stuff that you got to loose some points: RA, LAB, EXAMS. And the level for A is 94. THAT MAKES NO SENSE. THE PROPOSE OF THIS CLASS IS NOT TO KILL STUDENTS' GPA.",physics 212 | ||
5/4/2012 16:23:36,Electrical Engineering,,Freshman,4-7 hours,3,,high school physics and computer science | ||
5/4/2012 16:30:36,Industrial Engineering,,Freshman,4-7 hours,5 - Very difficult,"I found this course very difficult, since neither Electrical or Computer Engineering is part of my major, nor do I have any interest whatsoever in it. I know many EEs and CEs that find this class quite difficult, so you can imagine how someone with no background in the subject, and no interest would feel. I would recommend that ECE 110 should not be required in the GE/IE curriculum, but still satisfy credit hour requirements. That way, any GE/IE's who have an interest in the class can take it, but those who do not are no longer forced to. My GPA would appreciate it as well.",None | ||
5/4/2012 16:31:06,General Engineering,,Freshman,0-3 hours,4,,none | ||
5/4/2012 16:37:01,General Engineering,,Freshman,0-3 hours,4,More practice problems to prepare for exams,physics | ||
5/4/2012 16:41:06,Industrial Engineering,,Freshman,0-3 hours,4,,none | ||
5/4/2012 16:42:49,Industrial Engineering,,Freshman,0-3 hours,2,Interesting class.,- | ||
5/4/2012 16:49:07,general engineering,,Junior,4-7 hours,3,I felt the RA project was not hugely useful. Perhaps expanding its scope beyond just a paper. Perhaps a more hands on option.,"very little. I was fairly new to the subject matter beyond kvl, kcl, ohms law, ect." | ||
5/4/2012 16:50:03,Electrical Engineering,,Freshman,4-7 hours,3,,none | ||
5/4/2012 16:57:01,Electrical Engineering,,Freshman,0-3 hours,1 - Very easy,Really Easy,High School AP Physics | ||
5/4/2012 17:02:10,Electrical Engineering,,Freshman,4-7 hours,4,,ENG100 | ||
5/4/2012 17:17:41,Electrical Engineering,,Freshman,4-7 hours,3,,what I've learned in high school | ||
5/4/2012 17:25:12,General Engineering,,Sophomore,4-7 hours,4,The course is pretty difficult but very fun,None | ||
5/4/2012 17:36:11,Electrical Engineering,,Freshman,4-7 hours,3,too many materials. almost new concepts every class!,N/A | ||
5/4/2012 17:36:49,Industrial Engineering,,Freshman,0-3 hours,4,I feel like the initial labs we had were very boring because they did not make any sense. This was because most students did not know why they were doing those labs. I think the labs could be better structured and there should be one lab based on arduino. ,None | ||
5/4/2012 18:25:49,General Engineering,,Freshman,4-7 hours,3,"Interesting course, lab can be a pain trying to work around kinks in the equipment",Digital Electronics (Project Lead The Way course taken in high school) | ||
5/4/2012 18:31:29,Electrical Engineering,,Sophomore,4-7 hours,3,,none | ||
5/4/2012 20:28:04,General Engineering,,Sophomore,0-3 hours,4,This course takes A LOT of effort to understand for material. It is fun after understanding it but it just takes so much time ,No | ||
5/4/2012 20:38:04,Computer Engineering,,Freshman,4-7 hours,4,,High school physics? | ||
5/4/2012 20:39:19,Computer Engineering,,Freshman,4-7 hours,4,"Do not underestimate the exams, no matter how much you think you know the material. The Professors can get very creative with some of the simplest concepts.",High School Physics | ||
5/4/2012 20:59:31,Industrial Engineering,,Freshman,4-7 hours,5 - Very difficult,Very difficult for majors who know nothing about EE and CompE material before coming into this course.,None | ||
5/4/2012 21:02:14,Electrical Engineering,,Sophomore,4-7 hours,3,,High school physics | ||
5/4/2012 21:25:37,Electrical Engineering,,Freshman,8-11 hours,4,,High school physics | ||
5/4/2012 22:34:35,General Engineering,,Freshman,4-7 hours,4,"This is the only technical course i have taken so far where there isn't a discussion section. I believe a discussion/recitation for this course would make it 100% better. The material in ECE110 isn't more difficult than that of my other classes, but the class is MUCH HARDER because of the lack of time with the material. If you've never taken a circuits class before, it's hard to struggle through some of the concepts. When i get lost, there is no guidance and i get frustrated. I think if you included a mandatory discussion section once or twice a week, students would be able to grasp the material more fully and you would see those abominable test scores shoot up.",no previous coursework | ||
5/4/2012 23:11:01,General Engineering,,Freshman,4-7 hours,4,,None | ||
5/5/2012 2:05:45,Electrical Engineering,,Freshman,4-7 hours,3,,"Phys212, highschool" | ||
5/5/2012 2:31:20,Electrical Engineering,,Sophomore,0-3 hours,4,,Physics | ||
5/5/2012 3:14:12,Electrical Engineering,,Freshman,4-7 hours,2,"Course is not difficult if you attend lectures and do the homework. Lab is highly entertaining, but lengthy at times.",Previous work experience but not any classes | ||
5/5/2012 10:05:44,Electrical Engineering,,Freshman,0-3 hours,2,"pretty straightforward, and good professors with conpetent teaching abilities.",nope | ||
5/5/2012 10:57:14,Electrical Engineering,,Freshman,4-7 hours,3,Please do not change anything about the labs. They are the best part about the course. ,Courses in High school | ||
5/5/2012 11:41:16,General Engineering,,Freshman,4-7 hours,4,"The lab manual MUST CHANGE. It makes me see the ECE department as a disorganized one. ECE 110 is an introductory class which many freshmen are required to take, so having this kind of problem will never help improving the departments outlook.",NA | ||
5/5/2012 11:52:36,Electrical Engineering,,Junior,0-3 hours,3,no,none | ||
5/5/2012 18:30:59,General Engineering,,Sophomore,4-7 hours,4,"Challenging course. After the first test, the tests seemed a little better. ",none | ||
5/5/2012 19:05:22,Electrical Engineering,,Freshman,12-15 hours,3,,Basic algebra | ||
5/5/2012 21:45:27,Electrical Engineering,,Junior,8-11 hours,3,,feel easy when listen to the class | ||
5/5/2012 23:22:57,Electrical Engineering,,Sophomore,4-7 hours,5 - Very difficult,"While this was very difficult compared to other classes, it was mainly because I finally found a class that asked challenging questions that forced me to understand the material, not know the equation. Time-wise, it is about equal to other courses. | ||
RA project is good, and lab is the most useful part of the class. It also helps having the most difficult test at the beginning to wake everyone up, then have easier tests later",none | ||
5/5/2012 23:59:12,DGS,,Freshman,16-19 hours,5 - Very difficult,"It is fun, but you got to try hard to get an A. Curves are pretty good.",None | ||
5/6/2012 2:20:53,Computer Engineering,,Freshman,4-7 hours,4,If you understand the concepts and know how to apply them then you're good.,none | ||
5/6/2012 11:07:04,General Engineering,,Sophomore,0-3 hours,3,"The professors and TAs all seem interested in helping students, which is amazing for a class this size- you also seemed to have a good bead on which subjects people were struggling with and adjusted accordingly. | ||
There seemed to be a disconnect between the lectures and the labs- the subjects we talked about in the lectures showed up in the labs, but a bit of (verbal) preface to the subject would be appreciated. I recommend, sometime during lecture, saying something like ""when you see this chip in the lab, it will look like..."" or ""in the lab, you'll be using this chip to..."". That would help with the labs a lot (especially for us 8 am labs who are still half asleep).","PHYS 212, CS 101" | ||
5/6/2012 11:23:03,Computer Engineering,,Freshman,4-7 hours,3,"Great course, great teachers :)",High School Physics | ||
5/6/2012 13:20:47,Computer Engineering,,Freshman,8-11 hours,4,"The lecture was amazingly good, each lecture taught me new and powerful things in ECE and also refined what I already knew. The lab was stressful because some of the lab procedures had mistakes, components were often broken, and i felt that more time should have been given for the final design rather than formal lab procedures - our group didn't use any of the circuitry we built in previous labs.",CALC 221 | ||
5/6/2012 14:25:52,Computer Engineering,,Freshman,8-11 hours,5 - Very difficult,,calculus | ||
5/6/2012 16:08:44,Electrical Engineering,,Freshman,8-11 hours,4,,IDK | ||
5/6/2012 22:00:04,Electrical Engineering,,Freshman,8-11 hours,3,,Physics 212 | ||
5/7/2012 12:52:21,General Engineering,,Freshman,0-3 hours,3,"I felt the course was a little disorganized, ",- | ||
5/7/2012 18:57:08,Industrial Engineering,,Freshman,12-15 hours,5 - Very difficult,,"None, it was new material for me" | ||
5/9/2012 10:47:07,General Engineering,,Sophomore,8-11 hours,3,I really enjoyed the class,Physics mostly | ||
5/9/2012 15:02:54,Computer Engineering,,Freshman,4-7 hours,3,"Great class and content. But there are a lot of components to this course that one has to keep track of - Homework, RA Project, Labs, Lab final Design, Exams and Lecture attendance.",High School E&M and Boolean Algebra | ||
5/13/2012 15:29:18,industrial engineering,,Sophomore,8-11 hours,4,It requires a lot of hard work,none |
Oops, something went wrong.