Skip to content

Instantly share code, notes, and snippets.

@theideasmith
Created February 26, 2020 03:18
Show Gist options
  • Save theideasmith/81be1b6041d5f5bed2f8e201d8b891b9 to your computer and use it in GitHub Desktop.
Save theideasmith/81be1b6041d5f5bed2f8e201d8b891b9 to your computer and use it in GitHub Desktop.
Basic Thermodynamics Simulations
import numpy as np
import matplotlib.pyplot as plt
N = 10**4
xs = np.random.binomial(1, 0.5, size=(N, 100))
U = np.sum(xs, axis=1)
plt.hist(U, bins=100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment