Moon

Sign in


Step 1. Identify the problem

A problem can be one of 3 things: (1) deviation from the standard (2) gap between the ideal and reality (3) unfulfilled customer need

Step…


The trickiest part of living a life is you never know which part is reality (if there ever is) and which part is just a mental artifact. They intertwine with each other and always have power over your own will.

Maybe this is just me, as I grow older, I tend to feel more types of happiness and less types of sadness. There are still other negative moods hanging around in my life but they generally don’t stay with me very long. Maybe because emotions evaporate when they encountered their natural enemy: actions. When you feel disappointed, you can talk…


Let’s just calculate cost and benefits~

Benefits:

  1. Forced learning. Institutionalized process always help you decrease the demand for self-discipline, it’s much easier to stick to the end because of the environment as well as the sunken cost.
  2. Systematic learning in computer science, broaden my horizon for topics I would not consider learning on my own, learn more about history and connections between different topics.
  3. Community connection. You can talk to and work with similar people who have similar aspiration but different background
  4. Showing dedication. If you are willing to spend so much time to earn that piece of paper, you proved your dedication and passion in this…


  1. Want exact match of string without applying analyzer: define the type to be keyword , not text
  2. Add data in bulk: curl -H "Content-Type:application/json" -XPUT 127.0.0.1:9200/_bulk?pretty --data-binary @movies.json
  3. Handle concurrency: use if_seq_no=10 or retry_on_conflict=5 for optimistic concurrency control.
  4. Choose between normalization or denormalization: normalized data minimizes the data storage and easy to change data. Denormalized data minimizes the number of queries.
  5. Define parent-child relationship:
'"mappings":{
"properties":{
"film_to_franchise":{
"type":"join",
"relations":{"franchise":"film"}
}}}}'

6. Search using parent-child relationship

'{
"query":{
"has_parent":{
"parent_type":"franchise",
"query":{
"match":{
"title":"Star Wars"
}}}}}'
'{
"query":{
"has_child":{
"type":"film",
"query":{
"match":{
"title":"The Force Awakens"
}}}}}'

7. …


From Georgia Tech Course Software Development (https://www.youtube.com/watch?v=3a2x1iJFJWc)
  • reset is a limited version of checkout or branch -f

1. Log

alias graph="git log --all --decorate --oneline --graph"

git reflog

2. Change history in one branch:

(1) add new file without creating new commit:

git commit --amend --no-edit

(2) modify comment:

git commit --amend -m "this is the right message"

(3) get rid of untracked files:

git clean -df (d for directory, f for force)

(4) unstage:

git reset --staged

reset has 2 types: --soft(changed work in staging area) , --mix(changed work in working area) , --hard(lose all tracked files)

(5) revert:

git revert undo the effect of past…


Why does anyone want to go through the frustration and hopelessness to achieve anything?

(1) what’s the point of being successful? (Besides suffering itself. Ego and rewards will stop justifying the cost at some point) (2) you cannot even prove you live in reality.

It takes some luck, naivety and heroism to get to the more successful side. You may not think that way, because you are also hard working and intelligent. What? You do appreciate all the luck and heroism you had? Then you have to deal with all the helplessness and nihilism that comes with it. …


1. Set up your K8s

You can follow my first blog in this series to set up the cluster, just do not do the last step — delete the cluster

2. Download all the yaml file to tell k8s what to do

Once you set up the cluster, download all the yaml file from github and put them all together into a folder called “k8s-demo”. Each of these files defines a different object in of the web server, once you run them all together you will have the whole system runing. You can run them all together in your terminal using:

kubectl apply -f k8s-demo/

3. Test your web server

Once you finished all the above steps, you can go to postman…


It may seem daunting to run kubernetes commands, but once you learned its main components, the rest is just about learning the syntax to tell kubernetes what you want to do.

1. Main Components of K8s

We all know K8s is an orchestration tool, but what does that mean exactly? The most basic understanding can be: it allows you to define what resources you need, and how they are allocated to different workloads. K8s not only lets you set those things up, it helps you to monitor and maintain all the services you desires. …

Moon

I am a machine learning engineer. I love working on projects related to mental health and small business using NLU and 3D modeling.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store