Skip to content
This repository has been archived by the owner on Jan 17, 2019. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
snuffysasa committed May 1, 2014
2 parents 363ed03 + 8ec9fcb commit 0b42a30
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 48 deletions.
38 changes: 19 additions & 19 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
The MIT License (MIT)

Copyright (c) 2014, Students of UMM Csci 3601, Spring 2014 course offering
Callery,Emma,
Chapman,Josh,
Donatucci,David,
Eberhardt,Jeremy,
Gensch,Brennan,
Harren,Thomas,
Linder,Matthew
Megarry,Henry Thomas,
Mitchell,Brian,
Pagels,David Andrew,
Peterson,Andrew Lawrence,
Rachor,Kristin Marie,
Schuweiler,Michael,
Smolund,Isaac,
Stenberg,Dillon,
Stock,Brandon,
Vink,Zachary,
Walcome,Xavier Sarek,
Yadeau,Justin.
Emma Callery,
Josh Chapman,
David Donatucci,
Jeremy Eberhardt,
Brennan Gensch,
Thomas Harren,
Matthew Linder,
Henry Thomas Megarry,
Brian Mitchell,
David Andrew Pagels,
Andrew Lawrence Peterson,
Kristin Marie Rachor,
Michael Schuweiler,
Isaac Smolund,
Dillon Stenberg,
Brandon Stock,
Zachary Vink,
Xavier Sarek Walcome,
Justin Yadeau.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 7 additions & 7 deletions public/js/views/dashView.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class window.dashView extends Backbone.View
shortTitle += '...'
buttonString += buttonString1 + p + buttonString2 + shortTitle + buttonString3

#append the buttons to the div 'customModels'
# append the buttons to the div 'customModels'
$('#customModels').append(buttonString)

this
Expand All @@ -80,7 +80,7 @@ class window.dashView extends Backbone.View
window.location.href = '/model-maker'

loadYourPrompts: ->
#when you
#when you click any of your made prompts
$('.yourPrompts').click ->
prompt = this.id
thePrompt = new request
Expand Down Expand Up @@ -123,7 +123,7 @@ class window.dashView extends Backbone.View
$('#essayArea').hide()

submitEssay: ->
# alerts user if no text has been entered
# alerts user if no text has been entered
if $('#essayContents').val() is ""
alert "Please enter text to for LightSide to Grade."

Expand All @@ -137,18 +137,18 @@ class window.dashView extends Backbone.View
text: $('#essayContents').val()
}).save().done ->

# Post a prediction task to calculate the grade of the essay.
# Post a prediction task to calculate the grade of the essay.
thePredictionTask = new predictionTask({
answer_set: theAnswerSet.responseJSON.url
trained_model: thePrompt.responseJSON.default_models[0]
}).save().done ->

# Adds the prediction task to the process queue
# Adds the prediction task to the process queue
theProcess = new request()
theProcess.urlRoot = thePredictionTask.responseJSON.process
theProcess.save().done ->

# Request for checking status of essay grade calculation every second
# Request for checking status of essay grade calculation every second
thePredictionStatus = new request()
looping = setInterval (->

Expand All @@ -157,7 +157,7 @@ class window.dashView extends Backbone.View

if thePredictionStatus.attributes.status == 'S'

# Gets the grade
# Gets the grade
thePredictionResult = new predictionResult().fetch().done ->
$('#grade').html("Your grade for the submitted essay is " +
thePredictionResult.responseJSON.results[0].label + " out of 5.")
Expand Down
36 changes: 18 additions & 18 deletions public/unzip/unzip.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@
//Ideally we'd use the API, but as a stop-gap, we tried to use the ZipJs library. It was way beyond my understanding,
// so i'll leave this here


function processEssay(aString) {
//returns one complete line for a csv, given an essay.
var regex = /{#.*}/
//This regex finds our grade segment - which has the form {#grade1#grade2}.
//It assumes that it is among the first elements of a Essay.
//So similar forms *CAN* be in an essay, but ours *HAS* to be first.
var grades = getGrades(aString.match(regex))
var csvLine = "";
for (var i = 0; i <= grades.length; i++){
csvLine = csvLine + grades[i] + ", ";
}
//here we add the essay to the line, removing our grade construct.
return (csvLine + aString.replace(regex, "") + "\r\n")
}

function getGrades(aString){
var regex = /#([^#{}\s]*)/gm
//Matches hash tags, globally, with any non hash character in them.
var regex = /#([^#{}\s]*)/gm;
//Matches hashtags, globally, with any non hash character in them.
//So the hash ## is *NOT* ok, but all other hashes work.
//Even Unicode characters - #漢字 should work!
return aString.match(regex);
}

function processEssay(aString) {
//returns one complete line for a csv, given an essay.
var regex = /{#.*}/;
//This regex finds our grade segment - which has the form {#grade1#grade2}.
//It assumes that it is among the first elements of a Essay.
//So similar forms *CAN* be in an essay, but ours *HAS* to be first.
var tags = aString.match(regex);
var grades = getGrades(tags[0]);
var csvLine = "";
for (var i = 0; i < grades.length; i++){
csvLine = csvLine + grades[i] + ", ";
}
//here we add the essay to the line, removing our grade construct.
return (csvLine + aString.replace(regex, "") + "\r\n");
}

function dezip(zip){
//get the contents of a zip file
//return the compressed contents of a zip.
Expand Down
1 change: 1 addition & 0 deletions routes/user.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ populateDB = ->
email: '[email protected]'
firstName: 'Justin'
surname: 'YaDeau'
promptArray: ["https://try-api.lightsidelabs.com/api/prompts/449"]
},
{
password: '9hnMILd23145'
Expand Down
3 changes: 2 additions & 1 deletion routes/user.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion routes/user.map
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"user.coffee"
],
"names": [],
"mappings": ";AAAA;AAAA;;GAAA;AAAA;AAAA;AAAA,MAAA,gEAAA;;AAAA,EAKA,OAAA,GAAU,OAAA,CAAQ,SAAR,CALV,CAAA;;AAAA,EAMA,IAAA,GAAO,OAAA,CAAQ,uBAAR,CAAgC,CAAC,IANxC,CAAA;;AAAA,EAOA,QAAA,GAAW,OAAA,CAAQ,UAAR,CAPX,CAAA;;AAAA,EAQA,aAAA,GAAgB,OAAA,CAAQ,gBAAR,CAAyB,CAAC,QAR1C,CAAA;;AAAA,EAaA,IAAI,CAAC,KAAL,CAAW,EAAX,EAAc,SAAC,GAAD,EAAM,CAAN,GAAA;AAEZ,IAAA,IAAG,CAAA,KAAK,CAAR;aAEE,UAAA,CAAA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,SAAC,GAAD,EAAM,IAAN,GAAA;AAC1B,QAAA,IAAoB,GAApB;AAAA,iBAAO,IAAA,CAAK,GAAL,CAAP,CAAA;SAAA;AACA,QAAA,IAAA,CAAA,IAAA;AAAA,iBAAO,IAAA,CAAK,IAAL,EAAW,KAAX,CAAP,CAAA;SADA;AAEA,QAAA,IAAgC,IAAI,CAAC,QAAL,KAAiB,QAAjD;AAAA,iBAAO,IAAA,CAAK,IAAL,EAAW,KAAX,CAAP,CAAA;SAFA;eAGA,IAAA,CAAK,IAAL,EAAW,IAAX,EAJ0B;MAAA,CAD9B,CAAA,CADe;IAAA,CAAjB,CAAA,CADF;EAAA,CAJ4B,CAAhC,CAlEA,CAAA;;AAAA,EAkFA,MAAM,CAAC,OAAP,GAAiB,QAlFjB,CAAA;AAAA"
}
6 changes: 5 additions & 1 deletion views/partials/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="left col-sm-7 col-sm-push-1">
<h1 class="title center" >Welcome {{user.firstName}}, <small>Select a Model to Use or Edit</small></h1>

<!--hidden div that is the general template for showing practice models and made models on page-->
<!--Hidden div that is the general template for showing practice models and made models on page-->
<div id="essayArea" class="center hiding">
<h2 id="yourModel" class="title center">Here Is Your Model</h2>
<h3 id="promptTitle" class="title center"></h3>
Expand All @@ -20,6 +20,7 @@ <h4 class="title">Here is what our Model Reports:</h4>
</div>
</div>

<!--Start of Model buttons-->
<div id="dash" class="center">
<h3 class="title">Explore Our Ready To Use Models!</h3>
<button type='button' name='pickEssay1' class='pickEssay1 box' id="pickEssay1">
Expand All @@ -43,7 +44,9 @@ <h3 class="title">Custom Models</h3>
</div>
</div>
</div>
<!--End of the left side of the page-->

<!--Start of right side of the page-->
<div class="right col-sm-3 col-sm-push-1">
<div class="content">
<a href="account" class="btn btn-primary btn-lg btn-block">Account</a>
Expand All @@ -56,4 +59,5 @@ <h3 class="title"><small>Welcome to the </small> Dashboard<small>, a place where
<p><strong>Custom Models</strong> will be built to your specifications and displayed for you to use here on the Dashboard.</p>
</div>
</div>
<!--End of the right side of the page-->
</script>
2 changes: 1 addition & 1 deletion views/partials/model.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<div class="center hiding" id="waitingForModel">
<h4>Please Wait For LightSide To Build Your Model</h4>
<p id="waitMessage" style="text-align: center">This may take about half an hour, please do not close your browser window if you have not chosen to receive an email notification about your model.</p>
<p id="waitMessage" style="text-align: center">This may take about half an hour, please do not close your browser window.</p>
<img src="http://lightsidelabs.com/wp-content/uploads/2013/09/lightside-how-it-works-icon.png"></p>
<br />
<button id="hideWait" class="btn btn-success">Hide</button>
Expand Down
2 changes: 2 additions & 0 deletions views/partials/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ <h3 class="title center">Sign in <small>to create and use your own models!</smal
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h1 class="text-center">Welcome!!</h1>
</div>
<!--Entries-->
<div class="modal-body">
<form method="post" action="/" class="form col-md-12 center-block">
<div class="form-group">
Expand All @@ -63,6 +64,7 @@ <h1 class="text-center">Welcome!!</h1>
</div>
</form>
</div>
<!--Cancel button-->
<div class="modal-footer">
<div class="col-md-12">
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
Expand Down

0 comments on commit 0b42a30

Please sign in to comment.