Author Archives: cgao

About cgao

Cambridge, MA

install lightgbm on macOS high sierra

Reference: https://github.com/Microsoft/LightGBM/issues/1369 pip uninstall lightgbm git clone –recursive https://github.com/Microsoft/LightGBM ; cd LightGBM export CXX=g++-8 CC=gcc-8 mkdir build ; cd build cmake .. make -j4 pip install –no-binary :all: lightgbm Advertisements

Posted in MachineLearning | Leave a comment

Deploy node.js website on Google Cloud Platform (GCP) App Engine

Create a project. Install Google Cloud SDK Add app.yaml file to the project directory. In the file written: In terminal, type Go to the directory in terminal. Enter A domain (project-id.appspot.com) will be assigned.  Go to App Engine Setting -> … Continue reading

Posted in web develop | Leave a comment

Statistics Note

Hoeffding’s inequality: set the lower and upper bounds of confidence interval for a bounded random variable. The inequality holds for both large and small sample. Check MIT 18.650 Lecture Note Page 27. Slutsky’s theorem: replace theoretical mean with empirical mean in … Continue reading

Posted in Study Notes | Leave a comment

Python Note

0.02 multiplier 0.02 * 35 = 0.7000000000000001 2*35/100 = 0.7 round: Python 3 used bankers rounding round(2.5) = 2 round(2.5 + 1e-10) = 3 round(1.5) = 2

Posted in programming | Leave a comment

Master Referral Thread

Updated on: 08/17/17 Travel Uber: $5 off each of first 4 rides Referral Code: chig Referral Link: http://www.uber.com/invite/chig Lyft: $10 free credit Referral Code: CHI576689 Referral Link: https://lyft.com/ici/CHI576689 Via ride sharing: $10 credit Referral Code: chi5j7 Android Download,  iOS Download … Continue reading

Posted in Uncategorized | Leave a comment

INT_MAX and INT_MIN in Python

https://stackoverflow.com/questions/7604966/maximum-and-minimum-values-for-ints In Python 2.x, one can use sys.maxint In Python 3.x, it is sys.maxsize Use float float(‘inf’) float(‘-inf’)

Posted in Uncategorized | Leave a comment

Add All Amex Offers in One Second

Update: multiple tabs don’t work perfectly with this method. It may fail to load some offers. Add the offers you are to use manually if you are using multiple tabs. In Chrome, log into your account and load all offers. If … Continue reading

Posted in Uncategorized | Leave a comment