コード例 #1
0
ファイル: ForumFit.py プロジェクト: tmjnow/MOOC-data
 def trainTopicModel(self, topicModelParams, forceTrainOption):
     if os.path.exists(self.modelParamsPath + '.twords') and not forceTrainOption:
         logging.info('  skipping training: ' + self.currDB)
         return
     logging.info('trainTopicModel: ' + self.currDB)
     LDAcmd = [self.trainExecutablePath, '-est', \
                 '-ntopics', str(topicModelParams['numTopics']), \
                 '-niters', str(topicModelParams['numIters']), \
                 '-twords', str(topicModelParams['twords']), \
                 '-dfile', self.tokensPath]
     timeout = topicModelParams['maxRunTime']
     runner = RunExternal(LDAcmd, timeout, pipeOption = False)
     runner.run()
コード例 #2
0
ファイル: MakeVideoLogs.py プロジェクト: tmjnow/MOOC-data
 def zip(self, path):
     logging.info('MakeVideoLogs.zip(), ' + self.currCourseName)
     zipExec = RunExternal(['gzip', path], 3600)
     zipExec.run()
コード例 #3
0
ファイル: MakeVideoLogs.py プロジェクト: jinpa/MOOC-data
 def unzip(self, path):
     logging.info('MakeVideoLogs.unzip(), ' + self.currCourseName)
     zipExec = RunExternal(['gunzip',path],3600)
     zipExec.run()   
コード例 #4
0
ファイル: MakeForumViewLogs.py プロジェクト: jinpa/MOOC-data
 def zip(self,path):
     logging.info('MakeForumViewLogs.zip(), ' + self.currCourseName)
     zipExec = RunExternal(['gzip',path],3600)
     zipExec.run()   
コード例 #5
0
 def unzip(self, path):
     logging.info('MakeForumViewLogs.unzip(), ' + self.currCourseName)
     zipExec = RunExternal(['gunzip', path], 3600)
     zipExec.run()