Exemple #1
0
#samples = g.draw_samples(results, 1000);
'''

__author__ = 'johannes castner'

#because the above does nt yet work, for now, I'm using the below code to generate data:

# make treatments; (data generation and budget constraints)

# Now we leave out the "prize_door" value for the last member in the sequence. This is the one players bet on. This value comes in, when the timer runs out.

connection_string = "mongodb://localhost"
connection = pymongo.MongoClient(connection_string)
database = connection.blog
mClass = mClassDAO.mClassDAO(database)
pictures=pictureDAO.PictureDAO(database)
posts = blogPostDAO.BlogPostDAO(database)
puts  = putsDAO.PutsDAO(database)
users = userDAO.UserDAO(database)
models=modelDAO.ModelDAO(database)
sessions = sessionDAO.SessionDAO(database)
data = dataDAO.DataDAO(database)
points=pointsDAO.PointsDAO(database)
cvd = computerValueDAO.ComputerValueDAO(database)
# General Discussion on structure. This program implements a blog. This file is the best place to start to get
# to know the code. In this file, which is the controller, we define a bunch of HTTP routes that are handled
# by functions. The basic way that this magic occurs is through the decorator design pattern. Decorators
# allow you to modify a function, adding code to be executed before and after the function. As a side effect
# the bottle.py decorators also put each callback into a route table.
Exemple #2
0

import pymongo
import mClassDAO

db = pymongo.MongoClient().blog
dao = mClassDAO.mClassDAO(db)