Posts
Half and Half vs Milk
Fat content: Half and Half: 10.5% to 18% Whole milk: 3.25% Reduced fat milk: 2% Semi-skim milk: 1.8% Low fat milk: 1% 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. ref: http://www.howstuffcompares.com/doc/h/half-and-half-vs-milk.htm https://www.thekitchn.com/what-is-halfandhalf-ingredient-intelligence-205959 https://en.wikipedia.org/wiki/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: [code lang=“python”] with open(filename, ‘rb’) as f: byte_string = f.read() # binary ...
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”. [code] 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 [/code] ...
No title
Good read: https://tjcx.me/posts/i-wasted-40k-on-a-fantastic-startup-idea/ 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.” ...
Gato Barbieri - Europa (Earth's Cry Heaven's Smile)
https://youtu.be/YfyCrpUOAJw
Download youtube videos
https://www.alltubedownload.net/ https://github.com/ytdl-org/youtube-dl https://selfhostedsource.tech/self-hosted/p/alltube
Video Game Randomizers
It’s interesting how you can randomize some well-known retro games so you don’t always keep doing the same thing on the same old game. This brings new life to old school games. =) More amazingly I wonder how the code authors find out the parts in the rom to randomize. True geeks. https://www.debigare.com/randomizers/
HTTPie
This tool seems to be much more intuitive than curl and wget. HTTPie—aitch-tee-tee-pie—is a command line HTTP client with an intuitive UI, JSON support, syntax highlighting, wget-like downloads, plugins, and more. https://httpie.org/
Tools to draw diagrams and flowcharts
https://www.draw.io http://plantuml.com https://sketchviz.com/ https://www.diagram.codes/