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
// $sum | |
db.zips.aggregate([ | |
{ $group: | |
{ | |
"_id": { | |
"state": "$state" | |
}, | |
"population": { "$sum": "$pop" } | |
} | |
} |
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
import sys | |
sys.path.append("/usr/local/bin/ENV/lib/python2.7/site-packages") | |
import bottle | |
import pymongo | |
import cgi | |
import re | |
import datetime | |
import random | |
import hmac |
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
import sys | |
sys.path.append("/usr/local/bin/ENV/lib/python2.7/site-packages") | |
import pymongo | |
#import sys | |
connection = pymongo.Connection("mongodb://localhost", safe=True) | |
db=connection.school | |
students = db.students | |
def delete_lowest_score(): |