processor.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:ClassifyHub 作者: Top-Ranger 项目源码 文件源码
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.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号