This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
To augment lines of a text file with an 'OR' logical operator | |
How to use: | |
1. Prepare a .txt file with line items to combine with 'OR' | |
2. Use the file name as argument for the script | |
3. This script would generate a text | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import sys | |
def generate_commit(data_txt): | |
for line in data_txt.splitlines(): | |
yield line.split()[0] | |
def main(git_path, start_commit, end_commit, python_path, unittest_file_path): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Jupyter notebook could be good for educational purpose. | |
Before release in class, output generated during testing and execution number need to be removed. | |
""" | |
import os | |
import sys | |
import nbformat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''unpack ipynb''' | |
import os | |
from pprint import pprint | |
import re | |
import sys | |
def dont_do_anything(fw, cell_dict): | |
print "won't do anything about", cell_dict["cell_type"] | |
print cell_dict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is an attempt to automate extracting some fields from an entry of Curriculum Vitae on a conference publication. | |
For more about regular expression, please refer to https://docs.python.org/library/re.html. | |
""" | |
import re | |
def get_parser_cv_conf_paper(): | |
return re.compile( | |
r'(?P<paper_number>\(\d+\))[.,]?\s*(?P<authors>.+?)\s*[,:;]?\s*["“](?P<paper_title>.+?)["“”],?\s*(?P<conference_info>.+)') |