Permalink
Browse files

Merge branch 'master' of github.com:camillol/cs424p3

  • Loading branch information...
2 parents 4152f49 + 8877ecb commit 6e03bdb8380dd72d5d3a1aca81a2d09a80638f8e @camillol committed Nov 1, 2011
Showing with 15,295 additions and 8 deletions.
  1. +1 −2 MapView.pde
  2. +13,888 −0 WWW/cities.csv
  3. BIN WWW/images/img01.jpg
  4. BIN {Screenshots → WWW/images/screenshots}/ByAirportDistanceGraph.png
  5. BIN {Screenshots → WWW/images/screenshots}/ByStatesFilteredByDatetime&UFOTypes.png
  6. BIN {Screenshots → WWW/images/screenshots}/ByTimeGraph.png
  7. BIN {Screenshots → WWW/images/screenshots}/ByYearGraph.png
  8. BIN {Screenshots → WWW/images/screenshots}/ClusterByState.png
  9. BIN {Screenshots → WWW/images/screenshots}/DensityPopulationGraph.png
  10. BIN {Screenshots → WWW/images/screenshots}/PlayMovie.png
  11. BIN {Screenshots → WWW/images/screenshots}/SightingDetails.png
  12. BIN {Screenshots → WWW/images/screenshots}/SightingsNearAirport.png
  13. BIN {Screenshots → WWW/images/screenshots}/SightingsOnMap.png
  14. BIN {Screenshots → WWW/images/screenshots}/SightingsOnMapByUFO.png
  15. BIN WWW/images/screenshots/all_sightings.png
  16. BIN WWW/images/screenshots/deuteranope_chart.jpg
  17. BIN WWW/images/screenshots/deuteranope_map.jpg
  18. BIN WWW/images/screenshots/protanope_chart.jpg
  19. BIN WWW/images/screenshots/protanope_map.jpg
  20. BIN WWW/images/screenshots/sighting_types_by_state.png
  21. BIN WWW/images/screenshots/tritanope_chart.jpg
  22. BIN WWW/images/screenshots/tritanope_map.jpg
  23. +21 −5 WWW/it_came_out_of_the_sky.py
  24. +497 −0 WWW/stylesheets/style.css
  25. +57 −0 WWW/top_cities.txt
  26. +84 −0 WWW/views/data_extraction.html
  27. +73 −0 WWW/views/download.html
  28. +43 −1 WWW/views/index.html
  29. +146 −0 WWW/views/index.html.bk
  30. +198 −0 WWW/views/layout.html
  31. +94 −0 WWW/views/observations.html
  32. +172 −0 WWW/views/screenshots.html
  33. +21 −0 WWW/views/search.html
View
@@ -7,8 +7,7 @@ import java.util.concurrent.*;
import java.awt.geom.*;
/* Cohen-Sutherland algorithm */
-Line2D clipLineToRect(Line2D l, Rectangle2D r)
-{
+Line2D clipLineToRect(Line2D l, Rectangle2D r){
double x1 = l.getP1().getX();
double y1 = l.getP1().getY();
double x2 = l.getP2().getX();
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -45,10 +45,10 @@ def get(self):
path = os.path.join(os.path.dirname(__file__), views_path + 'index.html')
self.response.out.write(template.render(path, template_values))
-class Photos(webapp.RequestHandler):
+class Screenshots(webapp.RequestHandler):
def get(self):
- template_values = {'current_page': 'photos' }
- path = os.path.join(os.path.dirname(__file__), views_path + 'photos.html')
+ template_values = {'current_page': 'screenshots' }
+ path = os.path.join(os.path.dirname(__file__), views_path + 'screenshots.html')
self.response.out.write(template.render(path, template_values))
class Download(webapp.RequestHandler):
@@ -59,14 +59,28 @@ def get(self):
class Search(webapp.RequestHandler):
def get(self):
city_name = self.request.get("city_name")
+ shape_id = self.request.get("shape_id")
cities = City.all().filter("name = ", city_name.lower().capitalize()).fetch(limit=10)
sightings = []
if len(cities) > 0:
sightings = Sighting.all().filter("city_id IN ", map((lambda x: x.city_id), cities)).fetch(limit=100)
+ if len(shape_id) > 0:
+ sightings = Sighting.all().filter("shape_id = ", int(shape_id)).fetch(limit=100)
template_values = {'current_page': 'search', 'sightings': sightings, 'city_name': city_name }
path = os.path.join(os.path.dirname(__file__), views_path + 'search.html')
self.response.out.write(template.render(path, template_values))
+class DataExtraction(webapp.RequestHandler):
+ def get(self):
+ template_values = {'current_page': 'data_extraction'}
+ path = os.path.join(os.path.dirname(__file__), views_path + 'data_extraction.html')
+ self.response.out.write(template.render(path, template_values))
+
+class Observations(webapp.RequestHandler):
+ def get(self):
+ template_values = {'current_page': 'observations'}
+ path = os.path.join(os.path.dirname(__file__), views_path + 'observations.html')
+ self.response.out.write(template.render(path, template_values))
class Sightings(webapp.RequestHandler):
def get(self):
@@ -75,13 +89,15 @@ def get(self):
response = -1
if sighting_id != '':
response = db.GqlQuery("SELECT * FROM Sighting WHERE sighting_id = :1", int(sighting_id)).get().to_xml()
- self.response.out.writeln('<?xml version="1.0"?>');
+ self.response.out.write('<?xml version="1.0"?>');
self.response.out.write(response)
application = webapp.WSGIApplication([('/', Index),
('/sightings', Sightings),
- ('/photos', Photos),
+ ('/screenshots', Screenshots),
('/search', Search),
+ ('/data_extraction', DataExtraction),
+ ('/observations', Observations),
('/download', Download)],
debug=True)
Oops, something went wrong.

0 comments on commit 6e03bdb

Please sign in to comment.