Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. import config
  2.  
  3. if __name__ == '__main__':
  4.     for tag in config.relevant_tags:
  5.         f = open(config.output_folder + '/' + tag + '-withResponseTime.txt', 'r')
  6.         g = open(config.output_folder + '/' + tag + '-withResponseTime-negativeRemoved.txt', 'w')
  7.         g.write('Id Score FavoriteCount ViewCount ResponseTime Sentiment\n')
  8.         f.next()
  9.         for line in f:
  10.             p = line.split(' ')
  11.             assert len(p) == 6
  12.             print p[0]
  13.             if p[4] == 'NA' or float(p[4]) >= 0:
  14.                 g.write(line)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement