Friday, May 21, 2021
Git recover lost rebase
1. git reflog
First identify the lost commit
2. git diff master commithash --name-only
Check the differences in the files
3. git checkout commithash filepath
Pick the one that you need
Sunday, May 09, 2021
Get Json of Django Object
I found unnecessarily difficult to get json from django model object. Here is my simple solution to get that done.
def get_json_object(obj, fields): return {f:obj.__dict__[f] for f in fields}
Friday, May 07, 2021
Subscribe to:
Posts (Atom)
AI
Despite the benefits of AI we are starving for humanity.
-
It is difficult to create robot that cleans our arbitrary dirty dishes. However , if we put some digital information on dishes (special des...
-
Our parents were arranging their schedule according to sunrise and sunset. They are still consistent in their habit. However, in our generat...
-
Robot Particles Display: Current display devices can show any image for a very cheap price. But it will be very intresting if someone tr...