🌓

2023年度总结

2023年一眨眼就过去了。回想起年初的时候天天盼着到年底,觉得23年终究会是漫长的一年。现在真的到了23年的最后一天,反而有种恍如隔世的感觉。 工作22年底的时候逃离了万劫不复的startup,回到了老东家。暗自庆幸的同时也觉得工作实在是无法提起兴趣。做的东西没有什么价值不说,还要硬着头皮接受之前的烂摊子继续做。幸运的是这个烂摊子没有想象中的烂。捏着鼻子看了...

Read More

Deploy Flask Website On EC2 With Docker Compose [Part 2]

In the part 1 of the series, we created a docker-compose file for easier spin up of our web app. In this post, we continue on to the part where we deploy the web app on cloud so anyone can access it online. Exciting isn’t it? Let’s jump right in.

Read More

从骑车看卷文化与结果导向

骑车这个爱好是我最近两年发展起来的。

在漫长的5年博士和3年工作里,奉行“能坐着就不站着,能躺着就不坐着的”的节能主义者的我,终于在看到镜中自己圆润的肚子后顿悟了生命在于运动。为了保证既要运动,又不能累的养生方式,我盯上了骑车这个运动。我自认为我的骑车底子还是过硬的。且不说我的高中三年都是骑车上下学,而我家离高中大约是40分钟的自行车程。这约等于我每天被动骑车运动一个半小时。这之上还有课间操,体育课和放学打球等其他活动。满打满算怎么也是翻身上车骑着就走蹬个半小时大气不带喘的水平。既然初步评估十分满意,我遂去车行入手单车一辆。

Deployment

Read More

Deploy Flask Website On EC2 With Docker Compose [Part 1]

Recently I have been following this awesome Flask tutorial to build a microblog. The author does a great job breaking things down, and I was able to follow step by step from hello world to containerizing my web app. However, one cruicial step is left as an exercise for the reader to figure out, which is to organize everything with docker-compose, as well as actually deploying the web app on AWS. I took a stab at it and got it working, checkout my microblog here. Looking back, it was easy but not very straight forward. So I thought I will write down what I did and what I learned for future references. Here we go!

Read More

Exploring Side Project Ideas

Every once in a while I dream about creating something by coding a side project, but never really follow through. As years pass by I think maybe it will be a better idea if I start by tracking down all the interesting project ideas for future references. So here it goes.

Brainstorm

Read More

Introduction To Linear Regression: All You Need To Know About Linear Regression

Linear regression is usually the first model one will learn in a machine learning course due to its simplicity and popularity. While the idea of linear regression seems straight forward and easily understandable, there are many details around linear regression that are often overlooked but are important to know for ML practitioners. This article aims to provide couple of different perspectives on linear regression, what are its assumptions and why are those assumptions necessary, and go over some topics including multicolinearity and confidence intervals.

Read More

Dynamic program vs integer program: which one is better for knapsack problem?

The field of optimization encompasses many different fields of models and algorithms. You can classify the field base on many different critierias: Linear vs nonlinear, convex vs non-convex, continuous vs discrete, etc. Often times, one problem could be solved with multiple different approaches, and this is where different underlying solution philosohpies meet each other, which I find very interesting. In this article, we are going to dive deeper into the difference between dynamic programming and integer programming with the interesting and well-studied problem of knapsack problem.

Backpack

Read More

Another way to better organize Pandas code

Pandas is a powerful tool for data analysis. Writing in Pandas is a lot of fun because it enables you to do data manipulation with velocity. While working magic on a Jupyter notebook with Pandas can make you feel like a data wizard, sometimes it comes at the cost of code readability and modularity. If the code will be in production eventually (and it will be), it might be a good practice to start cleaning up your code after the exploration phase.

Read More

How to efficiently loop through Pandas DataFrame

If working with data is part of your daily job, you will likely run into situations where you realize you have to loop through a Pandas Dataframe and process each row. I recently find myself in this situation where I need to loop through each row of a large DataFrame, do some complex computation to each row, and recreate a new DataFrame base on the computation results. Savvy data scientists know immediately that this is one of the bad situations to be in, as looping through pandas DataFrame can be cumbersome and time consuming.

Read More

Build your own blog with Hexo

At this day and age, building a web blog yourself almost seems like an outdated thing to do. Most people can get by with using Wordpress or Wix, which does most of the blog-buildin...

Read More