def result_to_file(result, filename):
try:
with open(filename, 'w') as file:
for r in result:
file.write('{} {}\n'.format(r[0].get_repo_url(), r[1]))
except:
logging.error('Can not save results to {}'.format(filename))
##
# \brief Parsed the files in a directory and returns input for learning.
#
# The directory has to contain one file with the name of each class ('DEV', 'HW', 'EDU', 'DOCS', 'WEB', 'DATA', 'OTHER')
# containing lines with repositories of that class.
#
# \param path Path to directory.
# \return List containing Tupel (GITHUB, CLASS), where GITHUB is the repository as a github.Github class and
# CLASS is the class label of the repository as a string.
评论列表
文章目录