Skip to content

Instantly share code, notes, and snippets.

View has2k1's full-sized avatar

Hassan Kibirige has2k1

View GitHub Profile
@thesamovar
thesamovar / Automatic scientific axes layout for matplotlib.ipynb
Last active February 19, 2024 06:47
Automatic scientific axes layout for matplotlib.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kkremitzki
kkremitzki / SteamEnergy.py
Last active December 11, 2017 13:35
Very rough calculation of how many years it would take current human energy needs to drop Earth's core temp by 1 °C.
# The objective is to find the number of years at current total human energy
# use it would take to decrease the temperature of the Earth's 'core' by one
# degree Celsius. The maximum depth of the crust is 100 km so we'll offset
# the average radius by that amount to get the volume, multiply by the
# average density to get the mass. Then we'll multiply by the mass-weighted
# average specific heat and then by 1 °C to cancel things out.
# Using the equation Q = m Cp ΔT, we find the total energy available from
# that one degree drop. Divide by the current total human energy use per year
# to arrive at the number of years it would take.