Пример #1
0
 def get(self):
     if self.user:
         #            recommendations = recommendAlg.randomAlg()
         expertise_rmds = recommendAlg.expertiseRecommend(self.user.user_id)
         sparse_rmds = recommendAlg.sparseRecommend(self.user.user_id)
         diff_rmds = recommendAlg.diffRecommend(self.user.user_id)
         self.render('geturl.html',
                     expertise_rmds=expertise_rmds,
                     sparse_rmds=sparse_rmds,
                     diff_rmds=diff_rmds)
     else:
         self.redirect('/')
Пример #2
0
    def get(self):
#        import_urldata.test_import()
#        import_urldata.compute_diff()
        if self.user:
            recent_ratings = get_recent_ratings(self.user.user_id, 0)
#            recommendations = recommendAlg.randomAlg()
            expertise_rmds = recommendAlg.expertiseRecommend(self.user.user_id)
            sparse_rmds = recommendAlg.sparseRecommend(self.user.user_id)
            diff_rmds = recommendAlg.diffRecommend(self.user.user_id)
            self.render('homepage.html',
                        recent_ratings = recent_ratings,
                        expertise_rmds = expertise_rmds,
                        sparse_rmds = sparse_rmds,
                        diff_rmds = diff_rmds)
        else:
            self.render('welcome.html')
Пример #3
0
 def get(self):
     #        import_urldata.test_import()
     #        import_urldata.compute_diff()
     if self.user:
         recent_ratings = get_recent_ratings(self.user.user_id, 0)
         #            recommendations = recommendAlg.randomAlg()
         expertise_rmds = recommendAlg.expertiseRecommend(self.user.user_id)
         sparse_rmds = recommendAlg.sparseRecommend(self.user.user_id)
         diff_rmds = recommendAlg.diffRecommend(self.user.user_id)
         self.render('homepage.html',
                     recent_ratings=recent_ratings,
                     expertise_rmds=expertise_rmds,
                     sparse_rmds=sparse_rmds,
                     diff_rmds=diff_rmds)
     else:
         self.render('welcome.html')
Пример #4
0
 def get(self):
     if self.user:
         url = self.request.get('url')
         permit = self.check_X_Frame_Options(url)
         points = gmp_rules.worth_points(url, self.user)
         url_info = URLStorage.gql('WHERE url = :1', url).get()
         expertise_rmds = recommendAlg.expertiseRecommend(self.user.user_id)
         sparse_rmds = recommendAlg.sparseRecommend(self.user.user_id)
         diff_rmds = recommendAlg.diffRecommend(self.user.user_id)
         self.render('evaluate.html',
                     url = url,
                     permit = permit,
                     points = points,
                     url_info = url_info,
                     expertise_rmds = expertise_rmds,
                     sparse_rmds = sparse_rmds,
                     diff_rmds = diff_rmds)
     else:
         self.render('welcome.html')
Пример #5
0
 def get(self):
     if self.user:
         url = self.request.get('url')
         permit = self.check_X_Frame_Options(url)
         points = gmp_rules.worth_points(url, self.user)
         url_info = URLStorage.gql('WHERE url = :1', url).get()
         expertise_rmds = recommendAlg.expertiseRecommend(self.user.user_id)
         sparse_rmds = recommendAlg.sparseRecommend(self.user.user_id)
         diff_rmds = recommendAlg.diffRecommend(self.user.user_id)
         self.render('evaluate.html',
                     url=url,
                     permit=permit,
                     points=points,
                     url_info=url_info,
                     expertise_rmds=expertise_rmds,
                     sparse_rmds=sparse_rmds,
                     diff_rmds=diff_rmds)
     else:
         self.render('welcome.html')
Пример #6
0
 def get(self):
     sparse_rmds = recommendAlg.sparseRecommend(self.user.user_id)
     diff_rmds = recommendAlg.diffRecommend(self.user.user_id)
     self.render('help_rmd.html',
                 sparse_rmds=sparse_rmds,
                 diff_rmds=diff_rmds)