Finance, Tech, Law

Project \| W. Ding

English | 中文

Coding Notes

These are the notes of my coding practices, mainly written in Python. Some nice problems (from my perspective) are listed. You may take a look at those problems and try to solve it.


  • Version: 0.1.1
  • Release date: Oct 28, 2019
  • GitHub repo: Link

This is a Python decorator that can send email as notification. After append this decorator to the function, once the function finished, it will send you an email. This is especially useful in two scenarios:

  • Routine task: Some automation tasks executing daily, you may want an email to tell you whether it goes well or has problem.
  • Time-consuming task: For example, machine learning or large dataset processing, an email notification can let you safely work on other things and come back at right time.

Error Catcher

  • Version: 0.2
  • Release date: Dec 24, 2020
  • GitHub repo: Link

This is a convenient Python decorator to catch the errors information. Meanwhile, it can also capture the value of (1) variables related to that error or (2) other variables you interested at the time the error occurs. It support logging as well as printing directly. In short, this tool is more advanced and convenient than the original try & except statement in handling errors.

Standardize Country Code

  • Version: 0.3
  • Release date: June 3, 2021
  • GitHub repo: Link

This tool helps researcher to standardize the country names from various data source into uniformed country code.

This dataset is now cross-sectional. A panel data that takes regime change is under consideration. Please feel free to contact me if you want to contribute!