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
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
| [ | |
| { | |
| "key": "ctrl+f9", | |
| "command": "editor.debug.action.goToNextBreakpoint" | |
| }, | |
| { | |
| "key": "ctrl+shift+f9", | |
| "command": "editor.debug.action.goToPreviousBreakpoint" | |
| }, | |
| { |
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
| https://www.youtube.com/watch?v=Y_B6VADhY84 | |
| 1: Test early and often so you know where you were wrong. | |
| 2: Space out sessions so you know it's long term knowledge. | |
| 3: Do other stuff in between so it doesn't get boring. |
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
| """Rainbow print loop using ANSI escape sequences. Press Ctrl+C to stop. | |
| By Cees Timmerman | |
| 2020-03-06 First version. | |
| 2024-03-27 Fixed on Windows 11.""" | |
| import time | |
| CSI = "\x1b[" # Control Sequence Introducer. | |
| # https://en.wikipedia.org/wiki/ANSI_escape_code#Fe_Escape_sequences | |
| # On Windows 11, C1 control code 155 "\x9b" only works the same in VS Code. | |
| # https://github.com/microsoft/terminal/issues/10310 |
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
| """Ported from https://www.java67.com/2018/03/how-to-implement-radix-sort-in-java.html | |
| Sort an integer list in-place using least significant digit radix sort in Python. | |
| Usage: | |
| >>> x = [180, 50, 10, 30, 10, 29, 60, 0, 17, 24, 12]; radix_sort(x); x | |
| [0, 10, 10, 12, 17, 24, 29, 30, 50, 60, 180] | |
| Time Complexity of Solution: | |
| Best Case O(k*n); Average Case O(k*n); Worst Case O(k*n), | |
| where k is the length of the longest number and n is the | |
| size of the input array. |
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
| # pylint: disable=broad-except, invalid-name, redefined-builtin | |
| """CRUD API demo in Python with Flask. | |
| 2019-08-29 https://blog.rapidapi.com/how-to-build-an-api-in-python/ simplified by Cees Timmerman. | |
| 2022-05-09 Polished. | |
| """ | |
| import random | |
| from flask import Flask, request | |
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}'
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
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: |
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
| # -*- coding: utf-8 -*- | |
| from bottle import route, run | |
| @route('/') | |
| def index(): | |
| return '<h1>Hello World/h1>' | |
| run(host='localhost', port=8000) |
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
| /* Calculate the sum of upVotes, https://hackernoon.com/javascript-performance-test-for-vs-for-each-vs-map-reduce-filter-find-32c1113f19d7 | |
| Node v10.15.3 on Win10: | |
| reduce: 0.171ms | |
| 101 | |
| for loop: 0.005ms | |
| 101 | |
| for each: 0.018ms | |
| 101 | |
| map: 0.062ms | |
| 101 |