コード例 #1
0
 def check(self):
   contest = Contest(self.contestId)
   if contest.ratingChanges():
     users = contest.participants()
     channels = []
     for user in users:
       if self.toFilter.count(user) > 0:
         print "Will send to ... " + user
         channels.append(fix(user) + 'Rating')
     print "Ratings are out!"
     sender = NotificationSender('CF Contest %d, Ratings are updated!' % self.contestId, channels)
     print sender.send()
     return True
   return False
コード例 #2
0
 def check(self):
     contest = Contest(self.contestId)
     if contest.ratingChanges():
         users = contest.participants()
         channels = []
         for user in users:
             if self.toFilter.count(user) > 0:
                 print "Will send to ... " + user
                 channels.append(fix(user) + 'Rating')
         print "Ratings are out!"
         sender = NotificationSender(
             'CF Contest %d, Ratings are updated!' % self.contestId,
             channels)
         print sender.send()
         return True
     return False
コード例 #3
0
from contest import Contest

contest = Contest(675)

print contest.systemTest()
print contest.ratingChanges()

res = contest.participants()

for x in res:
  print x