コード例 #1
0
ファイル: test_retweeting.py プロジェクト: hashkat/hashkat
    def on_exit_all(self):
        for i in range(self.n_runs):
            print (i+1), 'initial retweets', self.initial_retweet_counts[i]
            self.assertTrue( 7500 < self.initial_retweet_counts[i] < 9000,
                "x_end should produce approximately the same value, between 7500 and 9000 conservatively. Was " + str(self.initial_retweet_counts[i]) + " for " + str(i))
	print "Standard deviation for initial retweet amounts:", stdev(self.initial_retweet_counts)
	print "Standard deviation for total retweet amounts:", stdev(self.all_retweet_counts)
コード例 #2
0
ファイル: test_retweeting.py プロジェクト: hashkat/hashkat
    def on_exit_all(self):
	print "Standard deviation for initial retweet amounts:", stdev(self.initial_retweet_counts)
	print "Standard deviation for total retweet amounts:", stdev(self.all_retweet_counts)
        self.assertTrue(stdev(self.initial_retweet_counts) < 3500,
            "Standard deviation for direct-author-follower retweet counts is much higher than expected.")
        self.assertTrue(stdev(self.all_retweet_counts) > 500,
            "Standard deviation for all retweet counts is much lower than expected.")
        self.assertTrue(stdev(self.all_retweet_counts) < 5000,
            "Standard deviation for all retweet counts is much higher than expected.")
コード例 #3
0
ファイル: test_retweeting.py プロジェクト: xqdd2004/hashkat
 def on_exit_all(self):
     for i in range(self.n_runs):
         print(i + 1), 'initial retweets', self.initial_retweet_counts[i]
         self.assertTrue(
             7500 < self.initial_retweet_counts[i] < 9000,
             "x_end should produce approximately the same value, between 7500 and 9000 conservatively. Was "
             + str(self.initial_retweet_counts[i]) + " for " + str(i))
     print "Standard deviation for initial retweet amounts:", stdev(
         self.initial_retweet_counts)
     print "Standard deviation for total retweet amounts:", stdev(
         self.all_retweet_counts)
コード例 #4
0
ファイル: test_retweeting.py プロジェクト: xqdd2004/hashkat
 def on_exit_all(self):
     print "Standard deviation for initial retweet amounts:", stdev(
         self.initial_retweet_counts)
     print "Standard deviation for total retweet amounts:", stdev(
         self.all_retweet_counts)
     self.assertTrue(
         stdev(self.initial_retweet_counts) < 3500,
         "Standard deviation for direct-author-follower retweet counts is much higher than expected."
     )
     self.assertTrue(
         stdev(self.all_retweet_counts) > 500,
         "Standard deviation for all retweet counts is much lower than expected."
     )
     self.assertTrue(
         stdev(self.all_retweet_counts) < 5000,
         "Standard deviation for all retweet counts is much higher than expected."
     )