Wuhan Coronavirus (2019-nCoV) Map (by Johns Hopkins CSSE)

Screen Shot 2020-01-30 at 1.54.17 PM

Half and Half vs Milk

Fat content:

Half and Half:

10.5% to 18%
Whole milk:

Reduced fat milk:

Semi-skim milk:

Low fat milk:

Skim milk:

0.0 to 0.5%

What is half and half? It is a simple blend of equal parts of whole milk and light cream. So milk and cream.


Unicode encodings in python

So “str” in Python 2 is now called “bytes,” and “unicode” in Python 2 is now called “str”.

Oh boy, that’s why I have been so confused working on both Py2 and Py3 on various projects.

It’s year 2020. From this point on, it’s all Py3. So I/O is all byte string, and try to keep unicode/str inside python. IO_byte_string.decode() -> unicode_string, unicode_string.encode() -> IO_byte_string. So:

with open(filename, 'rb') as f:
  byte_string =  # binary
  # external knowledge: data encoded in utf-8
  my_string = byte_string.decode('utf-8')
  # my_string is a list of "code points"
  # Output say, using 8859-1 (Latin-1)
  output_byte_string = my_string.encode('8859-1')


# external knowledge: data encoded in utf-8
with open(filename, 'r', encoding='utf-8') as f:
  my_string =  # code points

# Output say, using 8859-1 (Latin-1)
with open(filename2, 'r', encoding='8859-1') as f:


Python strings

I started out with “+”, then was told not to use it. So I listened and used “join”. Then later I used format. Now it seems that I should use “f”.

f'{s} {t}'               # 78.2 ns
s + '  ' + t             # 104 ns
' '.join((s, t))         # 135 ns
'%s %s' % (s, t)         # 188 ns
'{} {}'.format(s, t)     # 283 ns
Template('$s $t').substitute(s=s, t=t)  # 898 ns


No title

Good read:

Make something people want. It’s Y-Combinator’s motto and a maxim of aspiring internet entrepreneurs. The idea is that if you build something truly awesome, you’ll figure out a way to make some money off of it.

So I built something people wanted. Consumers wanted it, doctors wanted it, I wanted it. Where did I go wrong?

“To succeed, an offering must create value for all entities involved in the exchange—target customers, the company, and its collaborators.”

Strategic Marketing Management

Gato Barbieri – Europa (Earth’s Cry Heaven’s Smile)

Download youtube videos