Journal entries year 2020

From raju

2020-01-06

2020-01-12

In numerical analysis, the Kahan summation algorithm, also known as compensated summation significantly reduces the numerical error in the total obtained by adding a sequence of finite-precision floating-point numbers, compared to the obvious approach. This is done by keeping a separate running compensation (a variable to accumulate small errors).

https://rosettacode.org/wiki/Kahan_summation#Python - Implementation of the algorithm in Python

2020-01-15

Talks about how PR firms are responsible for all the "fluffy" articles in mainstream media.

2020-01-22

2020-01-31

They removed a lot of functionality that was deprecated in previous releases. It is recommended to first upgrade to pandas 0.25 and to ensure your code is working without warnings, before upgrading to pandas 1.0.

2020-02-01

2020-02-06

2020-02-10

2020-02-13

  • Query stackoverflow to get the code on command line. For example
    curl cheat.sh/python/reverse+a+string?Q
    

will tell how to reverse a string in Python.

The https://cheat.sh/ is useful in many ways. You can get cheat sheets of unix commands

    curl cheat.sh/tar
    

Query stackoverflow on the fly

    curl cheat.sh/python/reverse+a+string
    

Adding ?Q hides the text and only shows the code (useful for copy-pasting)

    curl cheat.sh/python/reverse+a+string?Q
    

There are many other goodies. See https://github.com/chubin/cheat.sh for further details.

2020-02-22

2020-02-24

  • 27.7% of people in China smoke. Genderwise it is 52.1% among men and 2.7% among women

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6546632/

2020-02-25

2020-03-02

  • The Rule of three states that two instances of similar code don't require refactoring, but when similar code is used three times, it should be extracted into a new procedure.

https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)

2020-03-06

2020-03-12

2020-03-14

  • ADVICE FOR YOUR MENTAL HEALTH FROM WHO

"Minimize watching, reading or listening to news that causes you to feel anxious or distressed; seek information only from trusted sources and mainly to take practical steps to prepare your plans and protect yourself and loved ones. Seek information updates at specific times during the day, once or twice. The sudden and near-constant stream of news reports about an outbreak can cause anyone to feel worried"

WHO: Mental Health and Psychosocial Considerations During COVID-19 Outbreak

Many good points in that link.

Respect! True leadership! Singaporeans are so lucky to have him as their PM.

2020-04-03

  • AIMS doctors did a double-hand transplant from a 20 year old male to a 21 year old female on 2017-08-09. Twenty surgeons and sixteen anesthetists performed the transplant over 13 hours. Over time, the color of her hands changed to match her skin tone and even their shape became more female-like. Globally, less than 200 hand transplants have been conducted, and no scientific evidence that recorded such changes exist.

https://indianexpress.com/article/cities/mumbai/21-yr-old-student-from-pune-and-the-curious-case-of-her-changing-hands-6301734/

2020-04-09

2020-04-11

2020-04-16

2020-04-23

There’s an argument that “if there aren’t enough ventilators and patients are being turned away, I’d rather have a slim chance with a hacked solution than no chance with no solution. The reality is closer to “if there aren’t enough ventilators, a hacked solution will most likely do more damage than good, take up too much time from already strained health care resources, and could lead to death.”

2020-04-26

2020-04-30

2020-05-02

2020-05-10

2020-05-14

2020-05-18

2020-05-22

2020-05-23

2020-05-27

2020-05-30

2020-06-15

2020-06-17

2020-06-19

"So you want to be a teacher when you grow up?" I asked Hamsini.

"Yes, daddy!" she replied.


"Let me ask you a question. What will you do if some students in your class do not want to study and they do not even listen to you?"

"That's ok. I will give them a 'pop quiz'. If they answer all the questions, they can leave. May be they know everything already and just want to go play outside."

2020-07-07

There are three approaches to reduce the effect of bird strikes. The vehicles can be designed to be more bird resistant, the birds can be moved out of the way of the vehicle, or the vehicle can be moved out of the way of the birds. https://en.wikipedia.org/wiki/Bird_strike#Countermeasures

2020-07-09

2020-07-10

  • Apparently Hertz stock is trading positive even after they declared bankruptcy. So Hertz wants to do a stock offering to see if they can get some of that crazy money.

https://www.bloomberg.com/opinion/articles/2020-06-12/if-you-want-hertz-have-some-hertz

2020-07-12

2020-07-30

2020-08-01

  • https://en.wikipedia.org/wiki/Arctic_Apples - Apples that do not brown. Genetically engineered by Okanagan Specialty Fruits Inc. Approved by FDA for safety. Polyphenol oxidase (PPO), responsible for browning, is knocked out using RNA-interference (RNAi) technique.

2020-08-04

  • On 2020-07-24, my chess rating touched a new peak of 1737 on lichess.
Chess rating peak 1737 20200724.png

2020-08-11

When playing a youtube video in a browser, you can type 0 through 9 to jump to 0% to 90% through the video.

2020-08-12