Natural uranium, in FNR 28,000,000 MJ/kg [so 28e9 J/g]
Hard black coal (IEA definition) >23.9 MJ/kg
Hard black coal (Australia & Canada) c. 25 MJ/kg [so 25e3 J/g and 207.25 g/mol according to https://pubchem.ncbi.nlm.nih.gov/compound/1-Anthrylmethanolate]
Sub-bituminous coal (IEA definition) 17.4-23.9 MJ/kg
Sub-bituminous coal (Australia & Canada) c. 18 MJ/kg
Lignite/brown coal (IEA definition) <17.4 MJ/kg
gunicorn run:app --workers=9
gunicorn run:app --workers=9 --worker-class=meinheld.gmeinheld.MeinheldWorker
Macbook Pro 2015 Python 3.7
| Framework | Server | Req/s | Max latency | +/- Stdev |
|---|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <!-- Thanks to https://medium.freecodecamp.org/learn-react-js-in-5-minutes-526472d292f4 --> | |
| <head> | |
| <script src="https://unpkg.com/react@15/dist/react.min.js">//React controllery stuff.</script> | |
| <script src="https://unpkg.com/react-dom@15/dist/react-dom.min.js">//More React controllery stuff.</script> | |
| <script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js">//Translates JSX to JS.</script> | |
| </head> | |
| <body> | |
| <div id="root">Target node for our React code.</div> | |
| <script type="text/babel"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Download with automatic resume. | |
| 2018-06-28 v1.0 by Cees Timmerman | |
| 2018-07-09 v1.1 Added If-Unmodified-Since header for consistency.""" | |
| import os, shutil, sys, time | |
| import requests # python -m pip install requests | |
| def download_file(url, local_filename=None): | |
| if not local_filename: | |
| local_filename = url.split('/')[-1] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from flask import Flask, request | |
| from urllib import unquote_plus | |
| import json | |
| import re | |
| app = Flask(__name__) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ SICP section 2.2.3, page 160. | |
| We can rearrange the pieces and use them in computing the product of the squares of the odd integers in a sequence: | |
| (define (product-of-squares-of-odd-elements sequence) (accumulate * 1 (map square (filter odd? sequence)))) | |
| (product-of-squares-of-odd-elements (list 1 2 3 4 5)) | |
| 225 | |
| 2017-09-13 v1.0 Translated & benchmarked by Cees Timmerman | |
| """ | |
| from __future__ import print_function # For Python 2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| echo "Benchmark for Fibonacci numbers with Python3, Cython and PyPy" | |
| echo ' | |
| def fib(n): | |
| "Return the n-th Fibonacci number." | |
| i = 0 | |
| a, b = 0, 1 | |
| if n < 2: |
Fix horizontal scrolling in Chrome: defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE and restart Chrome. Fix autoscroll with AutoScroll.
- Minimized windows don't even appear in Chrome's autocomplete!
Disable MacOS widget popover gesture via System Settings, "trackpad gestures", More Gestures, Notification Centre off.
Windows shortcut equivalents:
- Alt+Enter or F11 = Cmd+Ctrl+F or Globe+F
- Alt+Tab = Cmd+Tab (Switch app.) or Cmd+` (Switch app window.) No minimized windows. Witch is a bit slow but can cycle windows with Opt+Tab like Windows does, including the browser window you minimized to get to the one behind it, albeit without thumbnails. AltTab is better, also because it doesn't raise all w
- Install Git distributed version control software.
- Set up your default credentials (or display without a value to set):
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
or if he's a GitHub user, so you see his icon: johndoe@users.noreply.github.com
For example on MacOS:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Handling Errors using async/await | |
| * Has to be used inside an async function | |
| */ | |
| try { | |
| const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
| // Success 🎉 | |
| console.log(response); | |
| } catch (error) { | |
| // Error 😨 |